Use it when mirrored traffic must cross a routed network.
GRE Encapsulation · ERSPAN
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show monitor session 10 detailVerification & 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.
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.
ReferenceWhat it is1 section · depth on demand
Headers and MTU
ERSPAN type II adds an outer IP header (20), GRE (8 with sequence number) and an ERSPAN header (8): about 50 bytes. Type III adds a larger header with timestamps. If the path MTU is 1500, full-size mirrored frames are fragmented or dropped; raise MTU on the path or truncate mirrored frames (filter / mtu options on some platforms).
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
ERSPAN carries mirrored frames inside GRE across a routed network
The Catalyst 9300 ERSPAN guide states that the feature uses GRE (RFC 2784). The configured destination IP and origin IP form the destination and source of the outer GRE envelope, and the optional DSCP and TTL values apply to that outer header. The guide also lists an mtu setting (176–9000 bytes, default 9000) and header-type 3 for ERSPAN Type III; Type II is the default.
C9300(config)# monitor session 10 type erspan-source
C9300(config-mon-erspan-src)# source interface Gi1/0/24 both
C9300(config-mon-erspan-src)# destination
C9300(config-mon-erspan-src-dst)# erspan-id 10
C9300(config-mon-erspan-src-dst)# ip address 10.20.30.40
C9300(config-mon-erspan-src-dst)# origin ip address 10.0.0.11
C9300(config-mon-erspan-src-dst)# mtu 1450
C9300(config-mon-erspan-src)# no shutdown
$ tshark -i ens192 -f 'ip proto 47' -Y erspan -T fields -e ip.src -e erspan.spanid -e frame.len | head
Encapsulation stack
| Layer | Content |
|---|---|
| Outer Ethernet | Next-hop MACs on each routed hop |
| Outer IPv4 | Protocol 47 (GRE), origin IP → destination IP, DSCP and TTL from the session |
| GRE | Protocol type for ERSPAN Type II or III |
| ERSPAN header | Session ID, VLAN, CoS, and for Type III timestamps |
| Mirrored frame | The original Ethernet frame (possibly truncated) |
MTU planning
Encapsulation adds tens of bytes to every mirrored frame. A 1500-byte mirrored frame becomes larger than a 1500-byte path MTU.
| Option | Effect |
|---|---|
| Jumbo MTU on the path | Full frames delivered |
Session mtu below the path MTU | Mirrored frames truncated; headers kept (enough for most analysis) |
| Do nothing | Fragmentation or drops, depending on the path |
The guide notes truncation applies only to IPv4/IPv6 packets.
Security
ERSPAN streams contain copies of production traffic, so treat them as sensitive. Keep collectors on a management network, restrict protocol 47 with ACLs, and don't send ERSPAN across untrusted networks without encryption.
Documented example, not captured output.
Quick reference
ERSPAN sends mirrored traffic over a routed network by wrapping it in GRE, so the analyser can be anywhere reachable by IP rather than on the same Layer 2 network. The extra headers make each copied frame larger, which can cause problems on paths with a standard MTU.
ERSPAN encapsulates mirrored frames in GRE (IP protocol 47) with an ERSPAN header (type II or III), so the copy can be routed across an L3 network to a remote analyser.
Overhead is roughly 50 bytes per frame; large mirrored frames may exceed path MTU and be truncated or dropped. Some platforms support mtu truncation in the session to limit size.
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 → GRE Encapsulation. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc2784.html · confidence 94%