Step 1 |
enable
|
Enables
privileged EXEC mode.
|
Step 2 |
configure terminal
Device# configure terminal
|
Enters global
configuration mode.
|
Step 3 |
interface interface-type interface-number
Device(config)# interface GigabitEthernet1/0/1
|
Specifies the
interface on which ERSPAN source session is configured.
|
Step 4 |
plim ethernet vlan filter disable
Device(config-if)# plim ethernet vlan filter disable
|
(Optional)
Disables the VLAN filtering option for Ethernet interfaces. Use this command if
you are using the
vlan filter command or if the source interface is using
dot1q encapsulation.
|
Step 5 |
monitor session
span-session-number
type
erspan-source
Device(config)# monitor session 1 type erspan-source
|
Defines an
ERSPAN source session using the session ID and the session type, and enters
ERSPAN monitor source session configuration mode.
-
The
span-session-number argument range is from 1 to
1024. The same session number cannot be used more than once.
-
The 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 session
ID (configured by the
span-session-number
argument) and the session type (configured by the
erspan-source
keyword) cannot be changed once entered. 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 6 |
source drop-cause {
number | number list | number range | number range list
}
Device(config-mon-erspan-src)# source drop-cause 25
|
(Optional) Attaches drop-cause to ERSPAN session. After you enable the drop session, the device captures the packet drops
for all the ports on the Network Forwarding module. The maximum drop-cause value supported is 1024. You can express the drop-cause
number as a single number, a combination of single numbers, within a range, and within several ranges. The following examples
show how to express the drop-cause number:
-
Drop-cause number as a single number: source drop-cause 5 .
-
Drop-cause number as a combination of single numbers: source drop-cause 5, 6, 8 .
-
Drop-cause number within a range: source drop-cause 1 - 5 .
-
Drop-cause number within several ranges: source drop-cause 1 - 5, 10 - 20, 80 - 90 .
Note
|
You can also express drop-cause number as a combination of all the above. For instance, source drop-cause 3, 10, 20 – 25, 35, 89 - 90 .
|
|
Step 7 |
description
string
Device(config-mon-erspan-src)# description source1
|
(Optional)
Describes the ERSPAN source session.
|
Step 8 |
[no ]
header-type 3
Device(config-mon-erspan-src)# header-type 3
|
Configures a
switch to ERSPAN header type III.
|
Step 9 |
source
interface interface-name interface-number
Device(config-mon-erspan-src)# source interface GigabitEthernet1/0/1 rx
|
Configures
more than one WAN interface in a single ERSPAN session.
|
Step 10 |
source
vlan {id-single | id-list | id-range | id-mixed } [rx | tx | both ]
Device(config-mon-erspan-src)# source vlan 1
|
(Optional) Associates the ERSPAN source session number with the VLANs, and selects the traffic direction to be monitored.
|
Step 11 |
filter
vlan {id-single |
id-list |
id-range |
id-mixed }
Device(config-mon-erspan-src)# filter vlan 1
|
(Optional)
Configures source VLAN filtering when the ERSPAN source is a trunk port.
|
Step 12 |
filter
access-group acl-filter
Device(config-mon-erspan-src)# filter access-group ACL1
|
(Optional)
Associates an ACL with the ERSPAN session.
-
Use the
no
filter
access-group acl-filter command to detach the ACL from the
ERSPAN session.
-
Only ACL
name is supported to associate to the ERSPAN source session. If the ACL does
not exist or if there is no entry defined in the access control list, the ACL
name is not attached to the ERSPAN source session.
-
When the
ERSPAN source session is active, you cannot detach the ACL from the ERSPAN
source session. The source session must be shut down before detaching the ACL.
After the session shutdown, you must exit the session for the
shutdown command to execute, and then
re-enter the session to detach the ACL.
|
Step 13 |
destination
Device(config-mon-erspan-src)# destination
|
Enters ERSPAN
source session destination configuration mode.
|
Step 14 |
erspan-id
erspan-flow-id
Device(config-mon-erspan-src-dst)# erspan-id 100
|
Configures
the ID used by the source and destination sessions to identify the ERSPAN
traffic, which must also be entered in the ERSPAN destination session
configuration.
|
Step 15 |
ip
address
ip-address
Device(config-mon-erspan-src-dst)# ip address 10.10.0.1
|
Configures
the IP address that is used as the destination of the ERSPAN traffic.
|
Step 16 |
ip
prec
prec-value
Device(config-mon-erspan-src-dst)# ip prec 5
|
(Optional)
Configures the IP precedence value of the packets in the ERSPAN traffic.
|
Step 17 |
ip
dscp
dscp-value
Device(config-mon-erspan-src-dst)# ip dscp 10
|
(Optional)
Enables the use of IP differentiated services code point (DSCP) for packets
that originate from a circuit emulation (CEM) channel.
|
Step 18 |
ip
ttl
ttl-value
Device(config-mon-erspan-src-dst)# ip ttl 32
|
(Optional)
Configures the IP TTL value of the packets in the ERSPAN traffic.
|
Step 19 |
mtu
mtu-size
Device(config-mon-erspan-src-dst)# mtu 1500
|
Configures the
maximum transmission unit (MTU) size, in bytes, for ERSPAN encapsulation.
|
Step 20 |
origin
ip
address
ip-address
[force ]
Device(config-mon-erspan-src-dst)# origin ip address 10.10.0.1
|
Configures
the IP address used as the source of the ERSPAN traffic.
|
Step 21 |
vrf
vrf-id
Device(config-mon-erspan-src-dst)# vrf 1
|
(Optional)
Configures the VRF name to use instead of the global routing table.
|
Step 22 |
no shutdown
Device(config-mon-erspan-src-dst)# no shutdown
|
Enables the
configured sessions on an interface.
|
Step 23 |
end
Device(config-mon-erspan-src-dst)# end
|
Exits ERSPAN
source session destination configuration mode, and returns to privileged EXEC
mode.
|