PurposeCommand or Action
Configures the ERSPAN ID for the ERSPAN source session.
The ERSPAN range is from 1 to 1023. This ID uniquely
switch(config-erspan-src)#
erspan-id erspan-id
Step 4
identifies a source and destination ERSPAN session pair.
The ERSPAN ID configured in the corresponding destination
ERSPAN session must be same as the one configured in the
source session.
Configures the VRF that the ERSPAN source session uses
for traffic forwarding.
switch(config-erspan-src)# vrf
vrf-name
Step 5
Configures the destination IP address in the ERSPAN
session. Only one destination IP address is supported per
ERSPAN source session.
switch(config-erspan-src)#
destination ip ip-address
Step 6
Configures the sources and traffic direction in which to copy
packets. You can enter a range of Ethernet ports, a port
channel, or a range of VLANs.
switch(config-erspan-src)# source
[interface type slot/port |
port-channel channel-number] |
[vlan vlan-range] [rx | tx | both]
Step 7
You can configure one or more sources, as either a series
of comma-separated entries or a range of numbers. You can
specify up to 128 interfaces.
You can specify the traffic direction to copy as ingress,
egress, or both. The default direction is both.
The following example shows how to configure sampling for an ERSPAN-source session:
switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# monitor session 2 type erspan-source
switch(config-erspan-src)# sampling 40
switch(config-erspan-src)# erspan-id 30
switch(config-erspan-src)# vrf default
switch(config-erspan-src)# destination ip 200.1.1.1
switch(config-erspan-src)# source interface ethernet 1/47
switch(config-erspan-src)# show monitor session 2
session 2
---------------
type : erspan-source
state : up
granularity : 100 microseconds
erspan-id : 30
vrf-name : default
destination-ip : 200.1.1.1
ip-ttl : 255
ip-dscp : 0
header-type : 2
mtu : 200
sampling : 40
origin-ip : 150.1.1.1 (global)
source intf :
rx : Eth1/47
tx : Eth1/47
both : Eth1/47
source VLANs :
rx : 315
switch(config-erspan-src)#
Cisco Nexus 3548 Switch NX-OS System Management Configuration Guide, Release 6.x
173
Configuring ERSPAN
Configuring ERSPAN Sampling