Course contents

Chapter 4: VLANs and TrunksLesson 15 of 18

Beyond CCNA (optional). This topic is not on the CCNA 200-301 exam. It is useful at work and in later study; skip it if you are preparing for the exam. (Port mirroring (SPAN/RSPAN) is not in the exam topics.)

RSPAN

Mirroring traffic from a port on one switch to a packet analyser plugged into another switch.

Advanced · 6 min read · Before this: VLAN

Technical definition

RSPAN (Remote Switched Port Analyzer) is a Cisco feature that copies traffic from source ports or VLANs on one switch and carries the copies across trunk links in a dedicated RSPAN VLAN to a destination port on another switch, where a packet analyser captures them.

The analyser is two floors away

A server on Floor 1 has intermittent problems and you want to capture its traffic, but your packet analyser is on Floor 3. Plain SPAN (port mirroring) copies traffic to another port on the same switch. RSPAN (Remote SPAN) carries those copies across switches inside a dedicated RSPAN VLAN.

Copies riding RSPAN VLAN 900

Diagram
RSPAN carrying mirrored traffic across switches
RSPAN carrying mirrored traffic across switches
trunktrunkServerGi1/0/10SW1 · Floor 1sourceSW2 · Floor 2transitSW3 · Floor 3destinationAnalyserGi1/0/48

Device key: SW1 · Floor 1, SW2 · Floor 2, SW3 · Floor 3 (switch) · Analyser (laptop)

Lines show the example’s network connections. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type.

  1. 1. Traffic to watch. The server's traffic flows through Gi1/0/10 as usual; nothing about it changes.
  2. 2. Copies ride the RSPAN VLAN. SW1 copies the frames (copies can be dropped if links are busy) and sends them into RSPAN VLAN 900 across the trunks.
  3. 3. Delivered to the analyser. SW3 takes the copies out of VLAN 900 and sends them to the analyser's port.

Why it needs a special VLAN: an RSPAN VLAN behaves differently from a normal one. MAC learning is turned off and the copies are simply flooded along the path, because they're not really addressed to anyone on that VLAN. Never put user devices in it, and allow it on every trunk along the path.

The copies share the trunks with production traffic. Mirroring a busy server port in both directions can add more load than the uplinks have spare, so watch trunk utilisation while a session runs and stop the session when the capture is done.

Source, transit and destination switches

Every switch on the path (SW1, SW2, SW3)

vlan 900 remote-span

Marks VLAN 900 as an RSPAN VLAN. It must also be allowed on the trunks between the switches.

SW1 (source)

monitor session 1 source interface GigabitEthernet1/0/10 both monitor session 1 destination remote vlan 900

Copy traffic in both directions on the server's port into RSPAN VLAN 900.

SW3 (destination)

monitor session 1 source remote vlan 900 monitor session 1 destination interface GigabitEthernet1/0/48

Take whatever arrives in VLAN 900 and send it to the analyser's port.

Checking both monitor sessions

Example output · based on Cisco documentation; exact format varies by platform and software version
SW1#show monitor session 1
Session 1
---------
Type                     : Remote Source Session
Source Ports             :
    Both                 : Gi1/0/10
Dest RSPAN VLAN          : 900
On SW1, Remote Source Session with the right source port and Dest RSPAN VLAN: 900. On SW3 you should see a Remote Destination Session with VLAN 900 as the source and Gi1/0/48 as the destination. Also check show interfaces trunk: VLAN 900 must be allowed on every trunk in between.

Two RSPAN mistakes

Predict · scenario 1

Sessions on SW1 and SW3 look correct, but the analyser sees nothing. SW2's trunks allow only VLANs 10 and 20.

Predict · scenario 2

Someone puts a printer's access port into VLAN 900.