-
null
- Information About SPAN
- SPAN Sources
- Characteristics of Source Ports
- SPAN Destinations
- Characteristics of Destination Ports
- Guidelines and Limitations for SPAN
- Creating or Deleting a SPAN Session
- Configuring an Ethernet Destination Port
- Configuring MTU Truncation for Each SPAN Session
- Configuring the Rate Limit for SPAN Traffic
- Configuring Fibre Channel Destination Port
- Configuring Source Ports
- Configuring Source Port Channels, VSANs, or VLANs
- Configuring the Description of a SPAN Session
- Activating a SPAN Session
- Suspending a SPAN Session
- Displaying SPAN Information
Configuring SPAN
This chapter contains the following sections:
- Information About SPAN
- SPAN Sources
- Characteristics of Source Ports
- SPAN Destinations
- Characteristics of Destination Ports
- Guidelines and Limitations for SPAN
- Creating or Deleting a SPAN Session
- Configuring an Ethernet Destination Port
- Configuring MTU Truncation for Each SPAN Session
- Configuring the Rate Limit for SPAN Traffic
- Configuring Fibre Channel Destination Port
- Configuring Source Ports
- Configuring Source Port Channels, VSANs, or VLANs
- Configuring the Description of a SPAN Session
- Activating a SPAN Session
- Suspending a SPAN Session
- Displaying SPAN Information
Information About SPAN
SPAN Sources
SPAN sources refer to the interfaces from which traffic can be monitored. The Cisco Nexus device supports Ethernet, Fibre Channel, virtual Fibre Channel, port channels, SAN port channels, VSANs and VLANs as SPAN sources. With VLANs or VSANs, all supported interfaces in the specified VLAN or VSAN are included as SPAN sources. You can choose the SPAN traffic in the ingress direction, the egress direction, or both directions for Ethernet, Fibre Channel, and virtual Fibre Channel source interfaces:
-
Ingress source (Rx)—Traffic entering the device through this source port is copied to the SPAN destination port.
-
Egress source (Tx)—Traffic exiting the device through this source port is copied to the SPAN destination port.
If the SPAN source interface sends more than 6-Gbps traffic or if traffic bursts too much, the device drops traffic on the source interface. You can use the switchport monitor rate-limit 1G command on the SPAN destination to reduce the dropping of actual traffic on the source interface; however, SPAN traffic is restricted to 1 Gbps. For additional information see Configuring the Rate Limit for SPAN Traffic
![]() Note | The switchport monitor rate-limit 1G command is not supported on the Nexus 5500 platform. |
On the Cisco Nexus 5548 device, Fibre Channel ports and VSAN ports cannot be configured as ingress source ports in a SPAN session.
Characteristics of Source Ports
A source port, also called a monitored port, is a switched interface that you monitor for network traffic analysis. The switch supports any number of ingress source ports (up to the maximum number of available ports on the switch) and any number of source VLANs or VSANs.
A source port has these characteristics:
-
Cannot be a destination port.
-
Can be configured with a direction (ingress, egress, or both) to monitor. For VLAN and VSAN sources, the monitored direction can only be ingress and applies to all physical ports in the group. The RX/TX option is not available for VLAN or VSAN SPAN sessions.
-
There is no limit to the number of egress SPAN ports, but there is upper limit of 128 source ports in the monitor session.
-
Port Channel and SAN Port Channel interfaces can be configured as ingress or egress source ports.
-
Can be in the same or different VLANs or VSANs.
-
For VLAN or VSAN SPAN sources, all active ports in the source VLAN or VSAN are included as source ports.
SPAN Destinations
SPAN destinations refer to the interfaces that monitors source ports. The Cisco Nexus Series device supports Ethernet and Fibre Channel interfaces as SPAN destinations.
|
Source SPAN |
Dest SPAN |
|---|---|
|
Ethernet |
Ethernet |
|
Fibre Channel |
Fibre Channel |
|
Fibre Channel |
Ethernet (FCoE) |
|
Virtual Fibre Channel |
Fibre Channel |
|
Virtual Fibre Channel |
Ethernet (FCoE) |
Characteristics of Destination Ports
Each local SPAN session must have a destination port (also called a monitoring port) that receives a copy of traffic from the source ports, VSANs, or VLANs. A destination port has these characteristics:
-
Cannot be a source port.
-
Cannot be a port channel or SAN port channel group.
-
Does not participate in spanning tree while the SPAN session is active.
-
Is excluded from the source list and is not monitored if it belongs to a source VLAN of any SPAN session.
-
Receives copies of sent and received traffic for all monitored source ports.
Guidelines and Limitations for SPAN
SPAN traffic is rate-limited as follows on Nexus 5500 series switches to prevent a negative impact to production traffic:
Creating or Deleting a SPAN Session
You create a SPAN session by assigning a session number using the monitor session command. If the session already exists, any additional configuration information is added to the existing session.
1. switch# configure terminal
2.
switch(config)#
monitor session
session-number
DETAILED STEPS
| Command or Action | Purpose |
|---|
The following example shows how to configure a SPAN monitor session:
switch# configure terminal switch(config) # monitor session 2 switch(config) #
Configuring an Ethernet Destination Port
You can configure an Ethernet interface as a SPAN destination port.
![]() Note | The SPAN destination port can only be a physical port on the switch. |
1. switch# configure terminal
2.
switch(config)#
interface
ethernet
slot/port
3.
switch(config-if)#
switchport
monitor
4.
switch(config-if)#
exit
5.
switch(config)#
monitor
session
session-number
6.
switch(config-monitor)#
destination
interface ethernet
slot/port
DETAILED STEPS
The following example shows how to configure an Ethernet SPAN destination port (HIF):
switch# configure terminal switch(config)# interface ethernet100/1/24 switch(config-if)# switchport monitor switch(config-if)# exit switch(config)# monitor session 1 switch(config-monitor)# destination interface ethernet100/1/24 switch(config-monitor)#
The following example shows how to configure a virtual ethernet (VETH) SPAN destination port:
switch# configure terminal switch(config)# interface vethernet10 switch(config-if)# switchport monitor switch(config-if)# exit switch(config)# monitor session 2 switch(config-monitor)# destination interface vethernet10 switch(config-monitor)#
Configuring MTU Truncation for Each SPAN Session
To reduce the SPAN traffic bandwidth, you can configure the maximum bytes allowed for each replicated packet in a SPAN session. This value is called the maximum transmission unit (MTU) truncation size. Any SPAN packet larger than the configured size is truncated to the configured size.
![]() Note | MTU Truncation is not supported for SPAN-on-Drop sessions. |
1. switch# configure terminal
2. switch(config) # monitor session session-number
3. switch(config-monitor) # [no] mtu
4. (Optional) switch(config-monitor) # show monitor session session-number
5. (Optional) switch(config-monitor) # copy running-config startup-config
DETAILED STEPS
| Command or Action | Purpose | |
|---|---|---|
| Step 1 | switch# configure terminal |
Enters global configuration mode. |
| Step 2 | switch(config) # monitor session session-number |
Enters monitor configuration mode and specifies the SPAN session for which the MTU truncation size is to be configured. |
| Step 3 | switch(config-monitor) # [no] mtu |
Configures the MTU truncation size for packets in the specified SPAN session. The range is from 64 to 1518 bytes. |
| Step 4 | switch(config-monitor) # show monitor session session-number | (Optional)
Displays the status of SPAN sessions, including the configuration status of MTU truncation, the maximum bytes allowed for each packet per session, and the modules on which MTU truncation is and is not supported. |
| Step 5 | switch(config-monitor) # copy running-config startup-config | (Optional)
Copies the running configuration to the startup configuration. |
This example shows how to configure MTU truncation for a SPAN session:
switch# configure terminal switch(config) # monitor session 3 switch(config-monitor) # mtu switch(config-monitor) # copy running-config startup-config switch(config-monitor) #
Configuring the Rate Limit for SPAN Traffic
By configuring a rate limit for SPAN traffic to 1Gbps across the entire monitor session, you can avoid impacting the monitored production traffic.
1. switch# configure terminal
2.
switch(config)#
interface
ethernet
slot/port
3.
switch(config-if)#
switchport
monitor rate-limit 1G
4.
switch(config-if)#
exit
DETAILED STEPS
| Command or Action | Purpose | |
|---|---|---|
| Step 1 | switch# configure terminal |
Enters global configuration mode. |
| Step 2 |
switch(config)#
interface
ethernet
slot/port
|
Enters interface configuration mode for the specified Ethernet interface selected by the slot and port values. |
| Step 3 |
switch(config-if)#
switchport
monitor rate-limit 1G
|
Specifies that the rate limit is 1 Gbps. |
| Step 4 |
switch(config-if)#
exit
|
Reverts to global configuration mode. |
This example shows how to limit the bandwidth on Ethernet interface 1/2 to 1 Gbps:
switch(config)# interface ethernet 1/2 switch(config-if)# switchport monitor rate-limit 1G switch(config-if)#
Configuring Fibre Channel Destination Port
![]() Note | The SPAN destination port can only be a physical port on the switch. |
You can configure a Fibre Channel port as a SPAN destination port.
1. switch# configure terminal
2.
switch(config)#
interface fc
slot/port
3.
switch(config-if)#
switchport mode SD
4.
switch(config-if)#
switchport speed 1000
5.
switch(config-if)#
exit
6.
switch(config)#
monitor session
session-number
7.
switch(config-monitor)#
destination interface fc
slot/port
DETAILED STEPS
| Command or Action | Purpose | |
|---|---|---|
| Step 1 | switch# configure terminal |
Enters global configuration mode. |
| Step 2 |
switch(config)#
interface fc
slot/port
|
Enters interface configuration mode for the specified Fibre Channel interface selected by the slot and port values. |
| Step 3 |
switch(config-if)#
switchport mode SD
|
Sets the interface to SPAN destination (SD) mode. |
| Step 4 |
switch(config-if)#
switchport speed 1000
|
Sets the interface speed to 1000. The auto speed option is not allowed. |
| Step 5 |
switch(config-if)#
exit
|
Reverts to global configuration mode. |
| Step 6 |
switch(config)#
monitor session
session-number
|
Enters the monitor configuration mode. |
| Step 7 |
switch(config-monitor)#
destination interface fc
slot/port
|
Configures the Fibre Channel destination port. |
The following example shows how to configure an Ethernet SPAN destination port:
switch# configure terminal switch(config)# interface fc 2/4 switch(config-if)# switchport mode SD switch(config-if)# switchport speed 1000 switch(config-if)# exit switch(config)# monitor session 2 switch(config-monitor)# destination interface fc 2/4
Configuring Source Ports
1. switch# configure terminal
2. switch(config) # monitor session session-number
3.
switch(config-monitor) #
source
interface
type
slot/port [rx |
tx |
both]
DETAILED STEPS
| Command or Action | Purpose | |
|---|---|---|
| Step 1 | switch# configure terminal |
Enters global configuration mode. |
| Step 2 | switch(config) # monitor session session-number |
Enters monitor configuration mode for the specified monitoring session. |
| Step 3 |
switch(config-monitor) #
source
interface
type
slot/port [rx |
tx |
both]
|
Adds an Ethernet SPAN source port and specifies the traffic direction in which to duplicate packets. You can enter a range of Ethernet, Fibre Channel, or virtual Fibre Channel ports. You can specify the traffic direction to duplicate as ingress (Rx), egress (Tx), or both. By default, the direction is both. |
The following example shows how to configure a virtual Fibre Channel SPAN source port:
switch# configure terminal switch(config)# monitor session 2 switch(config-monitor)# source interface vfc 129 switch(config-monitor)#
Configuring Source Port Channels, VSANs, or VLANs
You can configure the source channels for a SPAN session. These ports can be port channels SAN port channels, VSANs and VLANs. The monitored direction can be ingress, egress, or both and applies to all physical ports in the group.
1. switch# configure terminal
2. switch(config) # monitor session session-number
3.
switch(config-monitor) #
source
{interface {port-channel |
san-port-channel}
channel-number [rx |
tx |
both]
|
vlan
vlan-range |
vsan
vsan-range }
DETAILED STEPS
| Command or Action | Purpose | |
|---|---|---|
| Step 1 | switch# configure terminal |
Enters global configuration mode. |
| Step 2 | switch(config) # monitor session session-number |
Enters monitor configuration mode for the specified SPAN session. |
| Step 3 |
switch(config-monitor) #
source
{interface {port-channel |
san-port-channel}
channel-number [rx |
tx |
both]
|
vlan
vlan-range |
vsan
vsan-range }
|
Configures port channel, SAN port channel, VLAN, or VSAN sources. For VLAN or VSAN sources, the monitored direction is implicit. |
The following example shows how to configure a port channel SPAN source:
switch# configure terminal switch(config)# monitor session 2 switch(config-monitor)# source interface port-channel 1 rx switch(config-monitor)# source interface port-channel 3 tx switch(config-monitor)# source interface port-channel 5 both switch(config-monitor)#
This example shows how to configure a SAN port channel SPAN source:
switch(config-monitor)#switch# configure terminal switch(config)# monitor session 2 switch(config-monitor)# source interface san-port-channel 3 rx switch(config-monitor)#
The following example shows how to configure a VLAN SPAN source:
switch# configure terminal switch(config)# monitor session 2 switch(config-monitor)# source vlan 1 switch(config-monitor)#
switch(config-monitor)#This example shows how to configure a VSAN SPAN source:
switch(config-monitor)#switch# configure terminal switch(config)# monitor session 2 switch(config-monitor)# source vsan 1 switch(config-monitor)#
Configuring the Description of a SPAN Session
For ease of reference, you can provide a descriptive name for a SPAN session.
1. switch# configure terminal
2. switch(config) # monitor session session-number
3.
switch(config-monitor) #
description
description
DETAILED STEPS
| Command or Action | Purpose |
|---|
The following example shows how to configure a SPAN session description:
switch# configure terminal switch(config) # monitor session 2 switch(config-monitor) # description monitoring ports eth2/2-eth2/4 switch(config-monitor) #
Activating a SPAN Session
The default is to keep the session state shut. You can open a session that duplicates packets from sources to destinations.
1. switch# configure terminal
2.
switch(config) #
no monitor session {all |
session-number}
shut
DETAILED STEPS
| Command or Action | Purpose |
|---|
The following example shows how to activate a SPAN session:
switch# configure terminal switch(config) # no monitor session 3 shut
Suspending a SPAN Session
By default, the session state is shut.
![]() Note | The Cisco Nexus switch supports two active SPAN sessions. The Cisco Nexus 5548 Switch supports four active SPAN sessions. When you configure more than two SPAN sessions, the first two sessions are active. During startup, the order of active sessions is reversed; the last two sessions are active. For example, if you configured ten sessions 1 to 10 where 1 and 2 are active, after a reboot, sessions 9 and 10 will be active. To enable deterministic behavior, explicitly suspend the sessions 3 to 10 with the monitor session session-number shut command. |
1. switch# configure terminal
2.
switch(config) #
monitor session {all |
session-number}
shut
DETAILED STEPS
| Command or Action | Purpose |
|---|
The following example shows how to suspend a SPAN session:
switch# configure terminal switch(config) # monitor session 3 shut switch(config) #
Displaying SPAN Information
1.
switch#
show
monitor [session {all |
session-number |
range
session-range} [brief]]
DETAILED STEPS
| Command or Action | Purpose |
|---|
The following example shows how to display SPAN session information:
switch# show monitor SESSION STATE REASON DESCRIPTION ------- ----------- ---------------------- -------------------------------- 2 up The session is up 3 down Session suspended 4 down No hardware resource
The following example shows how to display SPAN session details:
switch# show monitor session 2 session 2 --------------- type : local state : up acl-name : acl1 source intf : source VLANs : rx : source VSANs : rx : 1 destination ports : Eth3/1

Feedback