Configuring SPAN
•
Creating a SPAN Session and Specifying Ports to Monitor
Beginning in privileged EXEC mode, follow these steps to create a SPAN session and specify the source
(monitored) and destination (monitoring) ports:
Command
Step 1
configure terminal
Step 2
monitor session session_number source
interface interface-id [, | -] [both | rx | tx]
Step 3
monitor session session_number
destination interface interface-id
Step 4
end
Step 5
show monitor [session session_number]
Step 6
copy running-config startup-config
To remove the entire SPAN session, use the no monitor session session_number global configuration
command. To remove a source or destination port from the SPAN session, use the no monitor session
session_number source interface interface-id global configuration command or the no monitor session
session_number destination interface interface-id global configuration command.
This example shows how to set up a SPAN session, session 1, for monitoring source port traffic to a
destination port. First, any existing SPAN configuration for session 1 is cleared, and then bidirectional
traffic is mirrored from source port 1 to destination port 2.
Catalyst 2950 Desktop Switch Software Configuration Guide
20-6
When SPAN is enabled, configuration changes have these results:
If you change the VLAN configuration of a destination port, the change is not effective until
–
SPAN is disabled.
If you disable all source ports or the destination port, the SPAN function stops until both a
–
source and destination port are enabled.
Purpose
Enter global configuration mode.
Specify the SPAN session and the source port (monitored port).
For session_number, specify 1.
For interface-id, specify the source port to monitor. Valid interfaces
include physical interfaces and port-channel logical interfaces
(port-channel port-channel-number).
(Optional) [, | -] —Specify a series or range of interfaces. This option
is valid when monitoring only received traffic. Enter a space after the
comma; enter a space before and after the hyphen.
(Optional) Specify the direction of traffic to monitor. If you do not
specify a traffic direction, the source interface sends both transmitted
and received traffic.
•
both—Monitor both received and transmitted traffic.
rx—Monitor received traffic.
•
tx—Monitor transmitted traffic.
•
Specify the SPAN session and the destination port (monitoring port).
For session_number, specify 1.
For interface-id, specify the destination port. Valid interfaces include
physical interfaces.
Return to privileged EXEC mode.
Verify your entries.
(Optional) Save your entries in the configuration file.
Chapter 20
Configuring SPAN
78-11380-04