To start a new SPAN session, add or delete interfaces from an existing SPAN session, or delete a SPAN session, use the monitor session command in global configuration mode. To remove one or more source interfaces or destination interfaces from the SPAN session, use the no form of this command.
monitor session session_number type span-type
monitor session local_span_session_number source interface type number direction
monitor session local_span_session_number source service instance EFP_number type number direction
monitor session local_span_session_number destination interface type number
Syntax Description
session_number
|
Number of the local SPAN session; valid value is from 1 to 50.
|
span type
|
Type of span; only local span type is supported.
|
source interface |
Specifies the port SPAN source.
|
source service instance |
Specifies the EFP SPAN source.
|
destination interface |
Specifies the SPAN destination interface.
|
interface type number |
Specifies the interface type and number; valid values are gigabitethernet (1 to 9) and port-channel.
|
direction
|
Traffic direction. The direction argument accepts the following values: - both-monitors received and transmitted traffic (both ingress and egress).
- rx-monitors received traffic (ingress).
- tx-monitors transmitted traffic (egress).
|
Command Default
This command has no default settings.
Command Modes
Global Configuration (config)
Command History
Release |
Modification |
9.5.1
|
This command was introduced.
|
Usage Guidelines
Only one SPAN destination for a SPAN session is supported. If you attempt to add another destination interface to a session that already has a destination interface configured, you will get an error. You must first remove a SPAN destination interface before changing the SPAN destination to a different interface.
Examples
The following example shows how to start a third local monitor session.
Router(config)# monitor session 3 type local
Examples
The following example shows how to configure a port span for the TenGigabitEthernet 4/1 port and monitor the received traffic (ingress).
Router(config-mon-local)# source interface TenGigabitEthernet 4/1 rx
Examples
The following example shows how to configure a monitoring port for a traffic mirroring session.
Router(config-mon-local)# destination interface TenGigabitEthernet 5/1
Related Commands
Command |
Description |
show monitor |
Displays SPAN session number.
|