# SPAN-RSPAN

## 1-SPAN(Switched Port Analyzer Network)

To sniff or to analyse traffic on specific port or Vlan you can use SPAN. As it is shown in Figure 1, we want to have traffic of FastEthernet0/1 on port FastEthernet0/10. So, simple we can define monitor session for interface  FastEthernet0/1 as a source and  FastEthernet0/10 as a destination.

![Figure 1: SPAN](/files/-LBqUSs9Bxf9AfytJqwj)

```
SW# conf t
SW(config)#monitor session 1 source int fa0/1
SW(config)#monitor session 1 destination int fa0/10
```

{% hint style="info" %}
You can define a receive, transmit or both in monitor session:

&#x20;SW(config)#monitor session 1 source int fa0/1  rx | tx | both
{% endhint %}

## 2- RSPAN(Remotely Switched Port Analyzer Network)

This is exactly the same scenario of SPAN, but here we remotely monitor a port in switch. First, you have to define separate Vlan between two switches. Then, you can specify source and destination.

![](/files/-LBqUicqHjOmJ5v9r7DD)

```
SW1# conf t
SW1(config)#vlan 20
SW1(config)#remote-span
SW1(config)#exit

SW1(config)#monitor session 1 source int fa0/1
SW1(config)#monitor session 1 destination remote-vlan 20
```

```
SW1# conf t
SW1(config)#monitor session 1 source remote-vlan 20
SW1(config)#monitor session 1 destination int fa0/10
```

## 3- show command

```
SW# show monitor session 1 detail
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hamidsec.gitbook.io/cisco/span-rspan.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
