ERSPAN
Like SPAN and RSPAN, configuring ERSPAN is pretty straightforward. ERSPAN simply requires L3 connectivity between source and destination devices. The ERSPAN monitor session then builds a GRE tunnel that transports mirrored frames from the source port to the destination port.Basic ERSPAN configuration is as follows:
! Source switch monitor session SESSION-NUMBER type erspan-source source-interface
INTERFACE(S)|VLAN(S) {TX|RX|BOTH}
no shutdown destination erspan-id ERSPAN-ID ip address DESTINATION-IP origin ip address ORIGIN-IP ! Destination switch
monitor session
SESSION-NUMBER
type erspan-destination destination-interface
INTERFACE(S)
no shutdown source erspan-id
ERSPAN-ID
ip address
SOURCE
-IP
Below is a basic ERSPAN config to mirror data from R1 interface g3 to R3 interface g3. I created this topology using VIRL using CSR1000V routers for R1 and R3.