67-5
Catalyst 4500 Series Switch, Cisco IOS Software Configuration Guide - Cisco IOS XE 3.9.xE and IOS 15.2(5)Ex
Chapter 67 Configuring ERSPAN
How to Configure ERSPAN
How to Configure ERSPAN
• Configuring an ERSPAN Source Session, page 67-5
Configuring an ERSPAN Source Session
The ERSPAN source session defines the session configuration parameters and the ports or VLANs to be
monitored.
Command or Action Purpose
Step 1
Switch> enable
Enables privileged EXEC mode.
• Enter your password if prompted.
Step 2
Switch# configure terminal
Enters global configuration mode.
Step 3
Switch(config)# monitor session
span-session-number type erspan-source
Defines an ERSPAN source session using the session ID and the
session type, and enters ERSPAN monitor source session
configuration mode.
• Session IDs for source sessions or destination sessions are in the
same global ID space, so each session ID is globally unique for
both session types.
• The span-session-number and the session type (configured by
the erspan-source keyword) cannot be changed once
configured. Use the no form of this command to remove the
session and then re-create the session with a new session ID or
a new session type.
Step 4
Switch(config-mon-erspan-src)#
description description
Describes the ERSPAN source session.
Step 5
Switch(config-mon-erspan-src)# source
{interface type number | vlan vlan-ID}
[, | - | both | rx | tx]
Configures the source interface or the VLAN, and the traffic
direction to be monitored.
Step 6
Switch(config-mon-erspan-src)# filter
{ip {standard-access-list |
expanded-access-list | acl-name} | ipv6
{access-group acl-name} | vlan vlan-ID}
(Optional) Configures source VLAN filtering when the ERSPAN
source is a trunk port.
Note You cannot include source VLANs and filter
VLANs in the same session.
Step 7
Switch(config-mon-erspan-src)# no
shutdown
Disables the shutting down of the configured session.
Step 8
Switch(config-mon-erspan-src)#
destination
Defines an ERSPAN destination session and enters ERSPAN
monitor destination session configuration mode.
Step 9
Switch(config-mon-erspan-src-dst)# ip
address ip-address
Configures an IP address for the ERSPAN destination session.
Step 10
Switch(config-mon-erspan-src-dst)#
erspan-id erspan-ID
Configures the ID used by the destination session to identify the
ERSPAN traffic.
Step 11
Switch(config-mon-erspan-src-dst)#
origin ip address ip-address
Configures the IP address used as the source for the ERSPAN traffic.