switch(config-erspan-src)# no shut
switch(config-erspan-src)#
The following example shows how to configure a VLAN-based filter 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)# filter abcd.ef12.3456 1111.2222.3333 1234.5678.9012 1111.2222.3333
switch(config-erspan-src)# erspan-id 21
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 rx
switch(config-erspan-src)# source vlan 315
switch(config-erspan-src)# mtu 200
switch(config-erspan-src)# no shut
switch(config-erspan-src)#
Configuring ERSPAN Sampling
You can configure sampling for local and ERSPAN-source sessions only. SPAN and ERSPAN Sampling, on
page 136 provides more information about sampling.
Procedure
PurposeCommand or Action
Enters global configuration mode.switch# configure terminal
Step 1
Configures an ERSPAN source session.switch(config)# monitor session
{session-number | all} type erspan-source
Step 2
Configures a range for spanning packets. If the
range is defined as n, every nth packet will be
spanned.
switch(config-erspan-src)# sampling
sampling-range
Step 3
The sampling range is between 2 and 1023.
Configures the ERSPAN ID for the ERSPAN
source session. The ERSPAN range is from 1
switch(config-erspan-src)# erspan-id erspan-id
Step 4
to 1023. This ID uniquely 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
switch(config-erspan-src)# destination ip
ip-address
Step 6
address is supported per ERSPAN source
session.
Cisco Nexus 3548 Switch NX-OS System Management Configuration Guide, Release 7.x
160
Configuring ERSPAN
Configuring ERSPAN Sampling