set span

Use the set span command to enable or disable SPAN, and to set up the port and VLAN analyzer.

set span enable
set span disable
set span {src_mod/src_ports} {dest_mod/dest_port} [rx | tx | both]
set span {src_vlan} {dest_mod/dest_port} [rx | tx | both]

Syntax Description
enable  Keyword that enables SPAN. 
disable  Keyword that disables SPAN. 
src_mod  Monitored module (source). 
src_ports  Monitored port(s) (source). 
src_vlan  Monitored VLAN (source). 
dest_mod  Monitoring module (destination). 
dest_port  Monitoring port (destination). 
rx  (Optional) Keyword that specifies that information received at the source is monitored. 
tx  (Optional) Keyword that specifies that information transmitted from the source is monitored. 
both  (Optional) Keyword that specifies that information both transmitted from the source and received at the source is monitored. 
Default

The default configuration has port monitoring disabled, port 1/1 as the monitoring port (destination), VLAN 1 as the monitored VLAN (source), and both transmit and receive packets monitored. If the parameter rx, tx, or both is not specified, the default is both.

Command Type

Switch command.

Command Mode

Privileged.

Usage Guidelines

After SPAN is enabled and the defaults established, subsequent commands replace source ports, VLANs, and destination ports.

Use either a dedicated remote monitor probe or a Sniffer analyzer to monitor ports.

You may specify an RSM port as the source port in set span. If you specify an RSM port as the destination port, you receive this message:

Route switch port cannot be a Monitor port.

If you are setting the SPAN for Token Ring, and the source and destination ports specified are not in the context of the same Token Ring module, you receive this message:

Source port and destination port must be on the same module.
Examples

This example shows how to enable SPAN on the Catalyst 5000 series switch, and how to monitor transmit traffic on port 2/3 through port 2/4:

Console> (enable) set span enable
span enabled.
Console> (enable) set span 2/3 2/4 tx
Enabled monitoring of ports 2/3 transmit traffic by ports 2/4.
Console> (enable)
  

This example shows how to enable SPAN on multiple source ports:

Console> (enable) set span 2/1,3/1-2,5/7  1/2

If the above source ports are on different VLANs, you see this error message:

Failed to configure span feature
Related Commands

clear config
show span