Monitoring and Analyzing Switch Operation

Traffic Mirroring

Configure a Mirroring Policy to Select Inbound Traffic (Page B-66)

class < ipv4 ipv6 > < classname >

[no] [seq-number] < match ignore > < ip-protocol > < source-address >

<destination-address > [ precedence precedence-value ] [ tos tos-value ] [ ip-dscpcodepoint ] [ vlan vlan-id ]

policy mirror < policy-name>

[no] [seq-number] class < ipv4 ipv6 > < classname > action mirror <session> [ action mirror < session > ... ]

[no] default-class action mirror < session >

[no] < interface < port/trunk > vlan < vid-#>> service-policy <mirror-policy-name>in

 

 

In the policy mirror command, the mirror < session > parameter accepts a

 

 

number (1 to 4) or name, if the specified mirroring session has already been

 

 

configured with the name < name-str> option in the mirror command.

 

The no < interface vlan > service-policy in command removes the mirroring

 

configuration from a port, VLAN, trunk, or mesh interface for a specified

 

session, but leaves the session available for other assignments.

 

Configure the MAC-based Criteria to Select Traffic (Page B-63)

 

 

[no] monitor mac < mac-addr> < src dst both > mirror < session >

 

 

 

 

 

 

N o t e

 

If you have already configured session 1 with a destination, you can enter the

 

 

vlan < vid > monitor or interface < port > monitor command without traffic-

 

selection criteria and session identifier to:

 

 

■ Overwrite the existing session 1 configuration.

 

 

■ Automatically configure mirroring in session 1 for inbound and outbound

 

 

traffic on specified VLAN or port interfaces with the preconfigured desti­

 

 

nation.

 

 

 

1. Determine the Mirroring Session and Destination

For a Local Mirroring Session. Determine the port number for the exit port (such as A5, B10, etc.), then go to “4. Configure the Monitored Traffic in a Mirror Session” on page B-55.

For a Remote Mirroring Session. Determine the following information and then go to step 2, below.

■The IP address of the VLAN or subnet on which the exit port exists on the destination switch

■The port number of the remote exit port on the remote destination switch (In a remote mirroring endpoint, the IP address of the exit port and the remote destination switch can belong to different VLANs.)

B-49