You can configure a SPAN session for Cisco Access and Distribution switches (for example, Cisco Catalyst™ 2960 and Cisco Catalyst 3850) using the switch command line interface. To do this, access the target switch via Ethernet or console port and open the switch management functions. In configuration mode, create a new monitoring session, select a range of source interfaces to mirror and analyze traffic, set the destination interface and save the configuration.
For more information about configuring port mirroring for Cisco Access and Distribution switches, refer to Cisco equipment documentation.
To configure port mirroring for Cisco Access and Distribution switches:
conf t /
show monitor session all /
no monitor session <
session number
> /
where <
session number
>
is the number of the monitor session to be deleted. You can specify a value from 1 to 66. You can use the following keywords instead of the session number:
all
– to delete all monitor sessionslocal
– to delete local monitor sessionsremote
– to delete remote monitoring sessionsmonitor session <
session number
> source interface <
source port
>/<
VLAN ID
> - <
source port
>/<
VLAN ID
> /
where:
<
session number
>
– monitor session number<
source port
>
– source port number<
VLAN ID
>
– VLAN identifiermonitor session <
session number
>
destination interface <
destination port
>
/ <
destination port
> encapsulation replicate /
where:
<
session number
>
– monitor session number<
destination port
>
– number of the destination portend /
show monitor /
copy running-config startup-config /