Chapter 30 Configuring SPAN and RSPAN

Configuring SPAN and RSPAN

 

Command

Purpose

Step 4

 

 

monitor session session_number

Specify the SPAN session and the destination port (monitoring port).

 

destination {interface interface-id[, -]

For session_number, specify the session number entered in step 3.

 

[encapsulation replicate]}

 

Note For local SPAN, you must use the same session number for

 

 

 

 

the source and destination interfaces.

 

 

For interface-id, specify the destination port. The destination

 

 

interface must be a physical port; it cannot be an EtherChannel, and

 

 

it cannot be a VLAN.

 

 

(Optional) [, -] Specify a series or range of interfaces. Enter a space

 

 

before and after the comma; enter a space before and after the

 

 

hyphen.

 

 

(Optional) Enter encapsulation replicate to specify that the

 

 

destination interface replicates the source interface encapsulation

 

 

method. If not selected, the default is to send packets in native form

 

 

(untagged).

 

 

Note You can use monitor session session_number destination

 

 

command multiple times to configure multiple destination

 

 

ports.

Step 5

 

 

end

Return to privileged EXEC mode.

Step 6

 

 

show monitor [session session_number]

Verify the configuration.

 

show running-config

 

Step 7

 

 

copy running-config startup-config

(Optional) Save the configuration in the configuration file.

 

 

 

To delete a SPAN session, use the no monitor session session_number global configuration command. To remove a source or destination port or VLAN from the SPAN session, use the no monitor session session_number source {interface interface-id vlan vlan-id} global configuration command or the no monitor session session_number destination interface interface-idglobal configuration command. For destination interfaces, the encapsulation options are ignored with the no form of the command.

This example shows how to set up SPAN session 1 for monitoring source port traffic to a destination port. First, any existing SPAN configuration for session 1 is deleted, and then bidirectional traffic is mirrored from source Gigabit Ethernet port 1 to destination Gigabit Ethernet port 2, retaining the encapsulation method.

Switch(config)# no monitor session 1

Switch(config)# monitor session 1 source interface gigabitethernet1/0/1 Switch(config)# monitor session 1 destination interface gigabitethernet1/0/2 encapsulation replicate

Switch(config)# end

This example shows how to remove port 1 as a SPAN source for SPAN session 1:

Switch(config)# no monitor session 1 source interface gigabitethernet1/0/1

Switch(config)# end

This example shows how to disable received traffic monitoring on port 1, which was configured for bidirectional monitoring:

Switch(config)# no monitor session 1 source interface gigabitethernet1/0/1 rx

The monitoring of traffic received on port 1 is disabled, but traffic sent from this port continues to be monitored.

 

 

Catalyst 3750-E and 3560-E Switch Software Configuration Guide

 

 

 

 

 

 

OL-9775-02

 

 

30-13

 

 

 

 

 

Page 649
Image 649
Cisco Systems 3750E Monitor session sessionnumber, Destination interface interface-id, Encapsulation replicate, 30-13