Monitoring and Analyzing Switch Operation

Traffic Mirroring

To manage packets that do not match the match or ignore criteria in any class in the policy, and therefore have no mirroring actions performed on them, you can enter an optional default class. The default class is placed at the end of a policy configuration and specifies the mirroring actions to perform on packets that are neither matched nor ignored.

4.(Optional) To configure a default-class in a policy, enter the default-classcommand at the end of a policy configuration and specify one or more actions to be executed on packets that are not matched and not ignored.

Context: Policy configuration

Syntax: [no] default-class action mirror <session > [action mirror <session > ...]

Configures a default class that allows packets that are not matched nor ignored by any of the class configurations in a mirroring policy to be mirrored to the destination configured for the specified session.

Prerequisite: The local or remote exit port for a session must already be configured with a destination device before you enter the mirror < session > parameter in a default-class action statement. See “2. Configure a Mirroring Destination on a Remote Switch” on page B-50and “3. Configure a Mirroring Session on the Source Switch” on page B-52for more information.

For general information about how to configure and manage a service policy, refer to the “Creating a Service Policy” section in the “Classifier- Based Software Configuration” chapter in the Advanced Traffic Manage­ ment Guide.

5.Apply the mirroring policy to inbound traffic on a port (interface service- policy in command) or VLAN (vlan service-policy in command) interface.

C a u t i o n

After you apply a mirroring policy for one or more preconfigured sessions on

 

a port or VLAN interface, the switch immediately starts to use the traffic-

 

selection criteria and exit port to mirror traffic to the destination device

 

connected to each exit port.

 

In a remote mirroring session which uses IPv4 encapsulation, if the remote

 

switch is not already configured as the destination for the session, its perfor­

 

mance may be adversely affected by the stream of mirrored traffic.
B-71