![]() |
Cisco
|
|||
| Home > Work With My Switches > Cisco Catalyst Switches > Prepare to Configure Switched Port Analyzer (SPAN) on a Catalyst Switch | ||||||||||||||||||
IntroductionThis document provides general information to understand Switched Port Analyzer (SPAN) feature, its supported products, SPAN concepts and terminology along with its traffic types and guidelines that assists you to prepare, to configure Switched Port Analyzer on a Catalyst Switch. If you are already aware of the the SPAN features, its concepts and terminology and if you need to configure SPAN on a Catalyst switch refer to the document Configure Switched Port Analyzer (SPAN) and Remote SPAN (RSPAN) on a Cisco Catalyst Switch that runs Cisco IOS Software. Catalyst Switches that Support SPAN and RSPANBoth SPAN and RSPAN are supported on 2950, 2955, 2948G-L2, 2948G-L3, 2948G-GE-TX, 2960, 2970, 2980G-A, 3550, 3560, 3560-E, 3750, 3750-E, 4500 model Catalyst switches. The Catalyst switches CE 500, 2940, 2900XL and 3500XL supports only SPAN. SPAN and RSPAN Terminology and ConceptsThe Switched Port Analyzer (SPAN) feature, which is sometimes called port mirroring or port monitoring, selects network traffic for analysis by a network analyzer sniffer or other Remote Monitoring (RMON) probe such as a SwitchProbe device. SPAN mirrors neither received or transmitted or both, on one or more source ports or source VLANs, to a destination port for analysis. This section describes terminology and concepts associated with SPAN and RSPAN configuration. SPAN TerminologyComplete these steps:
SPAN SessionA local SPAN session is an association of a destination port with source ports and source VLANs. An RSPAN session is an association of source ports and source VLANs across your network with an RSPAN VLAN. The destination source is the RSPAN VLAN. You configure SPAN sessions with the parameters that specify the source of network traffic to monitor. Traffic monitoring in a SPAN session has these restrictions on Catalyst 3550 switch:
You can configure two separate SPAN or RSPAN sessions with separate or overlapping sets of SPAN source ports and VLANs. Both switched and routed ports can be configured as SPAN sources and destinations. SPAN sessions do not interfere with the normal operation of the switch. However, an oversubscribed SPAN destination, for example, a 10-Mbps port monitoring a 100-Mbps port, results in dropped or lost packets. You can configure SPAN sessions on disabled ports. However, a SPAN session does not become active unless you enable the destination port and at least one source port or VLAN for that session. The show monitor session session_number privileged EXEC command displays the operational status of a SPAN session. A SPAN session remains inactive after system power-on until the destination port is operational. SPAN Traffic TypesSPAN sessions include these traffic types: Receive (Rx) SPANThe goal of receive (or ingress) SPAN is to monitor all the packets received by the source interface or VLAN before any modification or processing is performed by the switch. A copy of each packet received by the source is sent to the destination port for that SPAN session. You can monitor a series or range of ingress ports or VLANs in a SPAN session. On tagged packets (Inter-Switch Link [ISL] or IEEE 802.1Q), the tagging is removed at the ingress port. At the destination port, if tagging is enabled, the packet appears with the ISL or 802.1Q headers. If no tagging is specified, packets appear in the native format. Packets that are modified because of routing are copied without modification for Rx SPAN; that is, the original packet is copied. Packets that are modified because of quality of service (QoS)—for example, modified Differentiated Services Code Point (DSCP)—are copied with modification for Rx SPAN. Some features that can cause a packet to be dropped during receive processing have no effect on SPAN; the destination port receives a copy of the packet even if the actual incoming packet is dropped. These features include IP standard and extended input access control lists (ACLs), IP standard and extended output ACLs for unicast and ingress QoS policing.VLAN maps, ingress QoS policing, and policy-based routing. Switch congestion that causes packets to be dropped also has no effect on SPAN. Transmit (Tx) SPANThe goal of transmit (or egress) SPAN is to monitor as much as possible all the packets sent by the source interface after all modification and processing is performed by the switch. A copy of each packet sent by the source is sent to the destination port for that SPAN session. The copy is provided after the packet is modified. For Catalyst 3550 switch only one egress source port is allowed per SPAN session and also VLAN monitoring is not supported in the egress direction. Packets that are modified because of routing—for example, with a time-to-live (TTL) or MAC-address modification—are duplicated at the destination port. Packets which are modified because of QoS, it is likely that the modified packet do not have the same DSCP (IP packet) or CoS (non-IP packet) as the SPAN source. Some features that can cause a packet to be dropped while transmit processing also affects the duplicated copy for SPAN. These features include VLAN maps, IP standard and extended output ACLs on multicast packets, and egress QoS policing. In the case of output ACLs, if the SPAN source drops the packet, the SPAN destination also drops the packet. In the case of egress QoS policing, if the SPAN source drops the packet, the SPAN destination does not drop it. If the source port is oversubscribed, the destination ports could have different dropping behavior. Characteristics of Source PortA source port, also called a monitored port, is a switched or routed port that you monitor for network traffic analysis. In a single local SPAN session or RSPAN source session, you can monitor source port traffic, such as received (Rx), transmitted (Tx), or bidirectional (both). The switch supports any number of source ports (up to the maximum number of available ports on the switch) and any number of source VLANs. A source port has these characteristics:
VLAN FilteringWhen you monitor a trunk port as a source port, all VLANs active on the trunk are monitored by default. You can use VLAN filtering in order to limit SPAN traffic monitoring on trunk source ports to specific VLANs.
Characteristics of Source VLANVSPAN is the monitoring of the network traffic in one or more VLANs. The SPAN or RSPAN source interface in VSPAN is a VLAN ID, and traffic is monitored on all the ports for that VLAN. VSPAN has these characteristics:
Characteristics of Destination PortEach local SPAN session or RSPAN destination session must have a destination port (also called a monitoring port) that receives a copy of traffic from the source ports and VLANs. A destination port has these characteristics:
Characteristics of Reflector PortThe reflector port is the mechanism that copies packets onto an RSPAN VLAN. The reflector port forwards only the traffic from the RSPAN source session with which it is affiliated. Any device connected to a port set as a reflector port loses connectivity until the RSPAN source session is disabled. The reflector port has these characteristics:
RSPAN VLANThe RSPAN VLAN carries SPAN traffic between RSPAN source and destination sessions. It has these special characteristics:
For VLANs 1 to 1005 that are visible to VLAN Trunking Protocol (VTP), the VLAN ID and its associated RSPAN characteristic are propagated by VTP. If you assign an RSPAN VLAN ID in the extended VLAN range (1006 to 4094), you must manually configure all intermediate switches. It is normal to have multiple RSPAN VLANs in a network at the same time with each RSPAN VLAN defining a network-wide RSPAN session. That is, multiple RSPAN source sessions anywhere in the network can contribute packets to the RSPAN session. It is also possible to have multiple RSPAN destination sessions throughout the network, monitoring the same RSPAN VLAN and presenting traffic to the user. The RSPAN VLAN ID separates the sessions. SPAN and RSPAN ExampleThis section explains you both SPAN and RSPAN with a diagramatic example. In a SPAN session, you can monitor a single port for both received and sent packets. SPAN (Local SPAN)The Switched Port Analyzer (SPAN) feature, which is sometimes called port mirroring or port monitoring, selects network traffic for analysis by a network analyzer sniffer or other Remote Monitoring (RMON) probe such as a SwitchProbe device. SPAN mirrors neither received or transmitted (or both) traffic on a source port and received traffic on one or more source ports or source VLANs, to a destination port for analysis. For example, in Figure-1, all traffic on port 5 (the source port) is mirrored to port 10 (the destination port). A network analyzer on port 10 receives all network traffic from port 5 though is not physically attached to port 5.
Only traffic, that enters or leaves source ports or traffic that enters source VLANs can be monitored by the use of SPAN; traffic that gets routed to ingress source ports or source VLANs could not be monitored. For example, if incoming traffic is monitored, traffic that gets routed from another VLAN to the source VLAN is not monitored. However, traffic that is received on the source VLAN and routed to another VLAN is monitored. Remote SPANRSPAN extends SPAN by enabling remote monitoring 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 that are carrying the RSPAN VLAN to any RSPAN destination sessions monitoring the RSPAN VLAN, as shown in Figure-2.
SPAN and RSPAN do not affect the switching of network traffic on source ports or source VLANs; a copy of the packets received or sent by the source interfaces are sent to the destination interface. You can use the SPAN or RSPAN destination port, to inject traffic from a network security device. For example, if you connect a Cisco Intrusion Detection System (IDS) Sensor Appliance to a destination port, the IDS device can send TCP Reset packets to close down the TCP session of a suspected attacker. SPAN on the Catalyst 2900XL/3500XL SwitchesThese are the features and the restrictions that are available: Features that are Available and RestrictionsThe port monitoring feature is not very extensive on the Catalyst 2900XL/3500XL. Therefore, this feature is relatively easy to understand. You can create as many local PSPAN sessions as necessary. For example, you can create PSPAN sessions on the configuration port that you have chosen to be a destination SPAN port. In this case, issue the port monitor interface command in order to list the source ports that you want to monitor. A monitor port is a destination SPAN port in Catalyst 2900XL/3500XL terminology.
Be careful that a port in the monitor state does not run the Spanning Tree Protocol (STP) while the port still belongs to the VLAN of the ports that it mirrors. The port monitor can be part of a loop if, for instance, you connect it to a hub or a bridge and loop to another part of the network. In this case, you can end up in a catastrophic bridging loop condition because STP no longer protects you. SPAN on the Catalyst 2940, 2950, 2955, 2960, 2970, 3550, 3560, 3560-E, 3750 and 3750-E Series SwitchesThese are guidelines for the configuration of the SPAN feature on the Catalyst 2940, 2950, 2955, 2960, 2970, 3550, 3560, 3560-E, 3750, and 3750-E Series Switches:
RSPAN Configuration GuidelinesFollow these guidelines when configuring RSPAN:
SPAN and RSPAN Interaction with other FeaturesSPAN interacts with these features:
If a physical port is added to a monitored EtherChannel group, the new port is added to the SPAN source port list. If a port is removed from a monitored EtherChannel group, it is automatically removed from the source port list. A physical port that belongs to an EtherChannel group can be configured as a SPAN source port and still be a part of the EtherChannel. In this case, data from the physical port is monitored as it participates in the EtherChannel. However, if a physical port that belongs to an EtherChannel group is configured as a SPAN destination, it is removed from the group. After the port is removed from the SPAN session, it rejoins the EtherChannel group. Ports removed from an EtherChannel group remain members of the group, but they are in the inactive or suspended state. If a physical port that belongs to an EtherChannel group is a destination port and the EtherChannel group is a source, the port is removed from the EtherChannel group and from the list of monitored ports.
SPAN and RSPAN Session LimitsYou can configure (and store in NVRAM) a maximum of two SPAN or RSPAN sessions on each switch. You can divide the two sessions between SPAN, RSPAN source, and RSPAN destination sessions. You can configure multiple source ports or source VLAN s for each session. On the Catalyst 2900XL/3500XL Series Switches, the number of destination ports that are available on the switch is the only limit to the number of SPAN sessions. On the Catalyst 2950 Series Switches, you can have only one assigned monitor port at any time. If you select another port as the monitor port, the previous monitor port is disabled, and the newly selected port becomes the monitor port. On the Catalyst 4500/4000 Switches with CatOS 5.1 and later, you can have several concurrent SPAN sessions. Default SPAN and RSPAN ConfigurationThe table shows the default SPAN and RSPAN configuration.
Next StepYou have completed this procedure and prepared to configure SPAN. To configure your SPAN on a Catalyst switch, refer to Configure Switched Port Analyzer (SPAN) on a Catalyst Switch that runs Cisco IOS Software. To make other changes to your switch, refer to the Switch Support Page. To configure other devices in your network, refer to the Configuration Overview Page. If this information does not solve your problem, contact the SMB Technical Assistance Center (SMB TAC) for assistance. Related Information |
||||||||||||||||||
![]() |
![]() |