Use it when several ERSPAN sessions share a destination, or mirrored traffic is not delivered.
ERSPAN ID
1. The ERSPAN ID identifies the session in the ERSPAN header.
2. Source and destination must match.
3. Used to separate multiple sessions.
4. Range 1–1023.
5. Document IDs.
source session ID → header → destination matches ID
Context & applicabilityCommon mistakes · platform/version boundaries
- Mismatched ERSPAN IDs between source and destination sessions.
- Several sources using the same ID to one collector, making flows hard to separate.
- Session left
shutdown(default on some platforms) — enable withno shutdown.
Operational reference
Fast context before you go deeper.
show monitor session allVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Checks Verify boundary
show monitor session all
Confirm each source session uses a unique ERSPAN ID and the destination session listens for the same ID. On the collector, filter with erspan.spanid == 10.
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.
- The ERSPAN ID links a source session to the matching destination session.
- Both ends must use the same ID.
- Different IDs allow several sessions to the same destination.
show monitor session <n> detail— ERSPAN ID
ReferenceWhat it is1 section · depth on demand
How it is used
The ERSPAN ID (span ID 1–1023) is carried in the ERSPAN header inside GRE. The destination session must use the same ID to accept the mirrored traffic, so several sources can send to one collector and still be kept apart.
monitor session 10 type erspan-source
source interface GigabitEthernet1/0/5
destination
erspan-id 110
ip address 10.99.0.50
origin ip address 10.1.1.1
Documented example, not captured output.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
The ERSPAN ID labels a mirrored flow so the receiver knows which session it belongs to
Each ERSPAN source session carries an erspan-id in the ERSPAN header. The Catalyst 9300 guide states that the ID configured on the source must match the ID on the destination session. A destination switch uses it to map received traffic to the right local destination port.
! source switch
C9300-A(config)# monitor session 10 type erspan-source
C9300-A(config-mon-erspan-src)# destination
C9300-A(config-mon-erspan-src-dst)# erspan-id 110
! destination switch
C9300-B(config)# monitor session 20 type erspan-destination
C9300-B(config-mon-erspan-dst)# source
C9300-B(config-mon-erspan-dst-src)# erspan-id 110
C9300-A# show monitor session 10 | include ERSPAN|Destination IP|Origin
ERSPAN ID : 110
Destination IP Address : 10.20.30.40
Origin IP Address : 10.0.0.11
Why IDs matter
| Scenario | Use of the ID |
|---|---|
| Several switches send to one collector | Separate captures per source session |
| One switch, several sessions to one destination | Each session maps to its own analyser port |
| Wireshark analysis | Filter with erspan.spanid == 110 |
ID plan example
| Range | Use |
|---|---|
| 100–199 | Data-centre access switches |
| 200–299 | Campus distribution |
| 900–999 | Temporary troubleshooting sessions |
Common mistakes
- Source and destination IDs don't match. The traffic reaches the destination switch, which then discards it.
- Reusing an ID for a temporary session that a collector filter already uses. The captures get mixed.
- Changing the session type: the guide notes the session ID and type can't be changed after creation. Delete the session and recreate it.
Record ERSPAN IDs in the same place as VLAN and IP plans, so troubleshooters can tell what a capture contains.
Documented example, not captured output.
Quick reference
The ERSPAN ID labels a mirroring session so that source and destination agree on which traffic belongs together. When several sessions are sent to the same collector, the ID is how they are told apart.
The ERSPAN ID (1–1023) identifies the session; source and destination must use the same ID, and an analyser can separate multiple sessions arriving at the same IP by this ID. Wireshark filter: erspan.spanid == 10.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Network Assurance → ERSPAN → ERSPAN ID. 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%