> For the complete documentation index, see [llms.txt](https://hamidsec.gitbook.io/cisco/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hamidsec.gitbook.io/cisco/span-rspan.md).

# 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
```
