ERSPAN
Cheat sheet · https://pcornel.dk/topic.php?topic=738
Answer
ERSPAN copies traffic on one device, wraps it in GRE and sends it to an IP address — another device or an analyser — so mirrored traffic can cross routed networks.
Remember
The source session needs an origin IP, a destination IP and an ERSPAN ID that the receiving end expects. The encapsulation adds about 50 bytes; large frames may be dropped. Mirrored traffic uses bandwidth on every link it crosses.
First checks
show monitor session all— every session with sources, direction and destination.show monitor session <n> detail— full detail, including VLANs and filters.show vlan remote-span— VLANs marked for RSPAN.show interfaces <destination> counters— whether copies are being sent out.show interfaces trunk— the RSPAN VLAN carried on the trunks.
Commands
no shutdown- Enable an administratively shut down interface.
show monitor session- Display SPAN, RSPAN and ERSPAN sessions.
monitor session <id> type erspan-source- Create an ERSPAN source session that sends copies over GRE.
source interface <interface>- Set the source interface of an ERSPAN session.
destination- Enter the destination configuration of an ERSPAN source session.
erspan-id <id>- Set the ERSPAN session ID; it must match on source and destination.
ip address <destination-ip>- Set the IP address of the ERSPAN destination.
origin ip address <source-ip>- Set the source IP address used for ERSPAN GRE packets.
Verify in this order
erspan-source session with sources, origin IP, destination IP and ID → GRE packets routed to the destination → (erspan-destination session with matching ID, or an analyser decoding ERSPAN) → frames delivered
Where it usually breaks
physical/link dependency → local object state → peer/control state → policy → forwarding/adjacency → end-to-end result
ERSPAN · operational reference
| ERSPAN layer | Meaning |
|---|---|
| Mirror source | Traffic selected for replication |
| Outer IP/GRE | Routable transport for mirror |
| ERSPAN ID/session | Identifies replicated stream |
| Analyzer | Final receipt/decapsulation, separate evidence |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=738