Step 1
|
configure terminal
switch# configure terminal
switch(config)#
|
Enters global configuration mode.
|
Step 2
|
monitor erspan origin ip-address
ip-address
global
switch(config)# monitor erspan origin ip-address 10.0.0.1 global
|
Configures the ERSPAN global origin IP address.
|
Step 3
|
no monitor session {session-number | all}
switch(config)# no monitor session 3
|
Clears the configuration of the specified ERSPAN session. The new session configuration is added to the existing session configuration.
|
Step 4
|
monitor session {session-number | all} type erspan-source [shut]
switch(config)# monitor session 3 type erspan-source
switch(config-erspan-src)#
|
Configures an ERSPAN Type II source session. By default the session is bidirectional. The optional keyword shut specifies
a shut state for the selected session.
|
Step 5
|
description
description
switch(config-erspan-src)# description erspan_src_session_3
|
Configures a description for the session. By default, no description is defined. The description can be up to 32 alphanumeric
characters.
|
Step 6
|
source {interface
type [ tx | rx |both] }
switch(config-erspan-src)# source interface ethernet 2/1-3, ethernet 3/1 rx
switch(config-erspan-src)# source interface port-channel 2
|
You can configure one or more sources, as either a series of comma-separated entries or a range of numbers. You can specify
the traffic direction to copy as ingress, egress, or both.
For a unidirectional session, the direction of the source must match the direction specified in the session.
|
Step 7
|
(Optional) Repeat Step 7 to configure all ERSPAN sources.
|
(Optional)
|
Step 8
|
destination ip
ip-address
switch(config-erspan-src)# destination ip 10.1.1.1
|
Configures the destination IP address in the ERSPAN session. Only one destination IP address is supported per ERSPAN source
session.
|
Step 9
|
erspan-id
erspan-id
switch(config-erspan-src)# erspan-id 5
|
Configures the ERSPAN ID for the ERSPAN source session. The ERSPAN range is from 1 to 1023.
|
Step 10
|
vrf
vrf-name
switch(config-erspan-src)# vrf default
|
Configures the virtual routing and forwarding (VRF) instance that the ERSPAN source session uses for traffic forwarding.
The VRF name can be any case-sensitive, alphanumeric string up to 32 characters.
|
Step 11
|
(Optional) ip ttl
ttl-number
switch(config-erspan-src)# ip ttl 25
|
(Optional)
Configures the IP time-to-live (TTL) value for the ERSPAN traffic. The range is from 1 to 255.
|
Step 12
|
(Optional) ip dscp
dscp-number
switch(config-erspan-src)# ip dscp 42
|
(Optional)
Configures the differentiated services code point (DSCP) value of the packets in the ERSPAN traffic. The range is from 0 to
63.
|
Step 13
|
no shut
switch(config-erspan-src)# no shut
|
Enables the ERSPAN source session. By default, the session is created in the shut state.
|
Step 14
|
exit
switch(config-erspan-src)# exit
switch(config)#
|
Exits the monitor configuration mode.
|
Step 15
|
(Optional) show monitor session {all | session-number | range
session-range} [brief]
switch(config)# show monitor session 3
|
(Optional)
Displays the ERSPAN session configuration.
|
Step 16
|
(Optional) show running-config monitor
switch(config)# show running-config monitor
|
(Optional)
Displays the running ERSPAN configuration.
|
Step 17
|
(Optional) show startup-config monitor
switch(config)# show startup-config monitor
|
(Optional)
Displays the ERSPAN startup configuration.
|
Step 18
|
(Optional) copy running-config startup-config
switch(config)# copy running-config startup-config
|
(Optional)
Copies the running configuration to the startup configuration.
|