Cisco CPT Command Reference Guide–CTC and Documentation Release 9.5.x and Cisco IOS Release 15.2(01)
Span Command Reference

Span Command Reference

This chapter describes commands to configure Span.

monitor permit-list

To restrict the destination ports that can be used for a SPAN session, use the monitor permit-list command in the global configuration mode.

monitor permit-list destination interface type number

Syntax Description

type

Type of interface; valid values are gigabitethernet or tengigabitethernet.

number

Number of interface.

Command Default

Disabled

Command Modes

Global Configuration (config)

Command History

Release Modification
9.5.1

This command was introduced.

Usage Guidelines

To prevent accidental configuration of ports as destinations, you can create a permit list of the ports that are valid for use as destinations. With a destination port permit list configured, you can only configure the ports in the permit list as destinations.

When you enter multiple instances of interface interface-typeslot/port-last-port, you must enter a space before and after the comma. For example, interface interface-typeslot/port-last-port, interface-typeslot/port-last-port, interface-typeslot/port-last-port.

Examples

The following example shows how to configure a destination port permit list that includes Gigabit Ethernet ports 5/1 through 5/4, and activate monitoring.

Router(config)# monitor permit-list destination interface gigabitethernet 5/1-4

Related Commands

Command Description
show monitor permit-list

Displays the permit-list state and interfaces configured.

monitor session

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.

show monitor permit-list

To display the destination ports that can be used for a SPAN session, use the show monitor permit-listcommand in either user or privileged EXEC mode.

show monitor permit-list

Command Default

This command has no default settings.

Command Modes

User EXEC (>)

Privileged EXEC (#)

Command History

Release Modification
9.5.1

This command was introduced.

Examples

The following example shows how to display the permit-list state and interfaces configured.

Router# show monitor permit-list

Related Commands

Command Description
monitor permit-list

Configures a destination port permit list or adds to an existing destination port permit list.

show monitor session

To display information about the SPAN sessions, use the show monitor session command in the user EXEC mode.

show monitor session all

Syntax Description

all

(Optional) Displays all sessions.

Command Default

This command has no default settings.

Command Modes

User EXEC (>)

Command History

Release Modification
9.5.1

This command was introduced.

Usage Guidelines

If you enter the show monitor session command without specifying a session, the information for all sessions is displayed.

Examples

The following example shows how to display the configuration of all the SPAN sessions.

Router# show monitor session all

Related Commands

Command Description
monitor session

Starts a new SPAN session.