06-22-2009 03:36 PM - edited 03-01-2019 03:50 PM
You can analyze network traffic passing through ports by using Switched Port Analyzer (SPAN). This sends a copy of the traffic to another port on the switch that has been connected to a SwitchProbe device, another Remote Monitoring (RMON) probe or security device. SPAN mirrors receive or transmit (or both) traffic on one or more source ports to a destination port for analysis.
Remote SPAN (RSPAN) extends SPAN by enabling RMON of multiple switches across your network. The traffic for each RSPAN session is carried over a user-specified RSPAN VLAN that is dedicated for that RSPAN session in all participating switches. The SPAN traffic from the sources is copied onto the RSPAN VLAN through a reflector port and then forwarded over trunk ports carrying the RSPAN VLAN to any RSPAN destination session monitoring the RSPAN VLAN.
SPAN and RSPAN do not affect the switching of network traffic on source ports. A copy of the packets received or sent by the source interfaces are sent to the destination interface. Except for traffic that is required for the SPAN or RSPAN session, reflector ports and destination ports do not receive or forward traffic.
These are configuration examples:
Switch(config)# no monitor session 1
Switch(config)# monitor session 1 source interface fastEthernet0/1
Switch(config)# monitor session 1 destination interface fastEthernet0/10 encapsulation dot1q
Switch(config)# end
Switch(config)# monitor session 1 destination interface Fa 0/5 encapsulation dot1q ingress vlan 5
Switch(config)# monitor session 1 destination interface Fa 0/5 encapsulation dot1q
Switch(config)# no monitor session 1
Switch(config)# monitor session 1 source interface fastEthernet0/10 tx
Switch(config)# monitor session 1 source interface fastEthernet0/2 rx
Switch(config)# monitor session 1 source interface fastEthernet0/3 rx
Switch(config)# monitor session 1 source interface port-channel 102 rx
Switch(config)# monitor session 1 destination remote vlan 901 reflector-port fastEthernet0/1
Switch(config)# end
Switch(config)# monitor session 1 source remote vlan 901
Switch(config)# monitor session 1 destination interface fastEthernet0/5
Switch(config)# end
For more information about configuring SPAN, refer to these documents:
That's a great explanation of how to configure port monitoring (SPAN) on Cisco Catalyst switches! Here are the key points:
SPAN (Switched Port Analyzer): Copies traffic from source ports to a destination port for monitoring.
RSPAN (Remote SPAN): Extends SPAN functionality across multiple switches using a dedicated VLAN.
Configuration Steps:
Clear any existing configuration for the desired session.
Define the source port(s) and traffic direction (ingress, egress, or both).
Define the destination port and encapsulation (if using a security device).
(Optional) Disable ingress traffic forwarding on the destination port.
RSPAN Configuration:
Specify source interfaces and traffic direction.
Define the destination RSPAN VLAN and reflector port.
Remember to refer to the specific documentation for your switch model (Catalyst 2940, 2950, 2955, 2970, 3550, or 3750) for detailed instructions and additional features.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: