Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

SPAN / RSPAN Reference

Direct answer

SPAN makes a switch copy the traffic of one or more ports or VLANs to another port where a capture device is connected. RSPAN does the same across switches, carrying the copies in a dedicated VLAN.

When to use this

Use it to take a packet capture on a switched network, and when a capture is empty, duplicated or missing packets.

First 30 seconds

1. show monitor session all — right source port, right direction, right destination?

2. Generate known traffic (a ping) and confirm it appears in the capture.

3. Empty → wrong source or direction; for RSPAN, the VLAN missing on a trunk in between.

4. Everything twice → both directions on several ports, or a whole VLAN.

5. Output drops on the destination → narrow the source.

Operational verification

session defined with the intended source and direction → destination port up and monitoring → (RSPAN: VLAN present end to end) → copies delivered without output drops → test traffic visible in the capture

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE
Key commandshow monitor session all
Scope / prerequisiteUse it to take a packet capture on a switched network, and when a capture is empty, duplicated or missing packets.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational verification Verify boundary
show monitor session all
show monitor session 1 detail
show interfaces GigabitEthernet1/0/48
show vlan remote-span

The session view lists sources with their directions, the destination, and whether tags are replicated. The destination interface shows "monitoring" as its state, and its output drop counter reveals whether copies are being lost to oversubscription. show vlan remote-span lists the RSPAN VLANs.

Before capturing, generate known traffic — a ping to or from the monitored device — and confirm it appears in the capture.

Known-good: the session lists the intended source and direction, the destination port shows no output drops, and test traffic is visible.

Step 2 Typical faults & boundaries Narrow the fault
  • The capture is empty. Wrong source port or direction, or the session is not active; for RSPAN, the VLAN is missing on a switch or trunk in between.
  • The device on the destination port lost its network connection. Expected: a destination port carries only copies.
  • VLAN tags, CDP or BPDUs are missing from the capture. encapsulation replicate is not configured, or the capturing network card strips tags.
  • Every packet appears twice. The session monitors both directions on several ports, or a whole VLAN.
  • Packets are missing at busy moments. The destination port is oversubscribed; narrow the source or direction.
  • Damaged frames are not in the capture. The switch discards them before copying; look at the port's error counters instead.
  • A new session is refused. The platform's limit of sessions is reached; remove an old one.
  • A forgotten session remains. The destination port stays out of service until the session is removed with no monitor session.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points

The destination port carries only copies — whatever is plugged in loses normal connectivity. VLAN tags and Layer 2 protocol frames are left out unless encapsulation replicate is set. An oversubscribed destination port drops copies silently. Remove the session afterwards.

Key checks
  • show monitor session all — sources with direction, destination, encapsulation.
  • show monitor session <n> detail — one session in full.
  • show interfaces <destination> — state "monitoring", output drops.
  • show vlan remote-span — RSPAN VLANs.
ReferenceWhat it is1 section · depth on demand

Mechanics & mental model

SPAN (Switched Port Analyzer) makes a switch send a copy of the traffic on one or more ports or VLANs to another port, where a capture device is connected. RSPAN does the same across switches, carrying the copies in a dedicated VLAN.

ReferenceWhy it matters1 section · depth on demand

Why it matters operationally

A switch delivers each frame only to the port where the destination lives, so a laptop plugged into a spare port sees almost nothing of other devices' traffic. Mirroring is how a packet capture is taken on a switched network. The copy is not always faithful, though — frames can be missing, duplicated or stripped of their VLAN tags — and knowing how keeps a capture from being misread.

ReferenceHow it works1 section · depth on demand

How it works

Local SPAN — source and destination on the same switch:

monitor session 1 source interface GigabitEthernet1/0/10 both
monitor session 1 destination interface GigabitEthernet1/0/48
  • The source is one or more ports, or one or more VLANs (source vlan 20). The direction is rx (received on the source), tx (sent from it) or both.
  • The destination port is taken out of normal service: it no longer forwards ordinary traffic, learns addresses or takes part in spanning tree. Whatever is plugged into it only receives copies, unless ingress is added to the destination command.

RSPAN — source and capture device on different switches. A VLAN is reserved to carry the copies:

vlan 999
 remote-span
! on the source switch
monitor session 1 source interface GigabitEthernet1/0/10 both
monitor session 1 destination remote vlan 999
! on the destination switch
monitor session 1 source remote vlan 999
monitor session 1 destination interface GigabitEthernet1/0/48

The RSPAN VLAN must exist on every switch in between and be allowed on the trunks. ERSPAN, on platforms that support it, sends the copies inside a GRE tunnel to an IP address, so they can cross routers.

What the copy does and does not contain.

  • VLAN tags are removed and Layer 2 protocol frames such as CDP and spanning-tree BPDUs are left out, unless the destination is configured with encapsulation replicate.
  • Frames the switch dropped on reception because of errors are not copied.
  • A destination port can only send as fast as its own speed. Mirroring both directions of a busy 1 Gb/s port to a 1 Gb/s port can need up to 2 Gb/s; the excess is dropped without any indication in the capture.
  • Monitoring a VLAN, or several ports in both directions, yields the same frame more than once — as it enters one port and as it leaves another.

A switch supports only a few sessions at a time. For a quick look at traffic to or from the device itself, the embedded capture feature (monitor capture) avoids the need for a separate port.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

SPAN and ERSPAN configuration reference

A SPAN session has sources, a destination, and settings that control what is copied. Cisco's Catalyst 9000 SPAN technote shows the essentials:

  • Local SPAN: monitor session <n> source interface <int> [rx|tx|both] and monitor session <n> destination interface <int>.
  • Verification: show monitor session, which lists sources by direction, destinations, encapsulation and ingress setting.
  • ERSPAN: encapsulates mirrored traffic in GRE so it can be routed. The ERSPAN ID must match on the source and destination sessions. ERSPAN isn't supported on Catalyst 9200 and needs a DNA licence.

Session types

TypeDestinationTransport
Local SPANA port on the same switchInternal
RSPANA port on another switchA dedicated RSPAN VLAN across trunks
ERSPANAn IP address (switch or analyser)GRE over IP

Configuration options

OptionEffect
source interface ... rx / tx / bothDirection to copy
source vlan ... rxCopy all ingress traffic in a VLAN
filter vlanLimit trunk sources to certain VLANs
destination ... encapsulation replicateKeep tags and Layer 2 protocol frames
destination ... ingressAllow the analyser to send traffic (use carefully)
erspan-id, origin ip address, destination ip addressERSPAN parameters (must match)
SW1(config)# monitor session 1 source interface GigabitEthernet1/0/5 both
SW1(config)# monitor session 1 destination interface GigabitEthernet1/0/48 encapsulation replicate
SW1(config)# monitor session 5 type erspan-source
SW1(config-mon-erspan-src)# source interface TenGigabitEthernet1/1/3 rx
SW1(config-mon-erspan-src)# destination
SW1(config-mon-erspan-src-dst)# erspan-id 50
SW1(config-mon-erspan-src-dst)# ip address 10.99.0.40
SW1(config-mon-erspan-src-dst)# origin ip address 10.255.0.11
SW1(config-mon-erspan-src)# no shutdown
SW1# show monitor session all
SW1# show monitor capture
analyst$ tshark -i eth0 -f "proto gre" -c 5 -T fields -e ip.src -e erspan.spanid -e eth.src

Choosing between them

NeedChoice
A quick look at one port, analyser nearbyLocal SPAN, or Embedded Packet Capture
A central analyser in the same campusRSPAN
An analyser in a data centre or cloudERSPAN
Long-term monitoringA dedicated tap or packet broker rather than SPAN

Mirroring never affects the original traffic, but copies are dropped if the destination is oversubscribed. The source also gets no indication of it.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

Authoritative/upstream documentation reviewed for bounded claims in Network & Protocols → SPAN / RSPAN Reference. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
spanrspanmonitor sessionport mirrorpacket mirror
Embedded quick reference

Operational notes

Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.

SPAN Capture Fast Check

Compact switched packet-capture setup checklist.

Before capture:

1. Define source interface/VLAN.

2. Choose rx / tx / both.

3. Ensure destination analyzer port has enough bandwidth.

4. Verify show monitor session.

5. Timestamp the capture and note where it was taken.

SPAN can drop mirrored traffic when oversubscribed.

Confirmation

Confirm action

Continue?