Mirror policy context

Syntax


no SEQ_NUM class ipv4|ipv6|mac CLASS_NAME action mirror SESSION mirror SESSION

The mirror policy context associates classes with mirror actions. After creating a policy, the user is placed in the mirror policy context. Traffic that matches the rules inside the class is mirrored using the associated mirror instance. Traffic that matches an ignore rule is not mirrored. Traffic that does not match any entries has the default-mac-class action applied. MAC classes cannot be configured in the same policy with IPv4 and IPv6 classes. The default-class is to be used with policies that contain IPv4 and IPv6 classes, whereas the default-mac-class is to be used with MAC classes.

class_name

Enter an ASCII string

<1-4>

Specify a mirror session as the action.

Create a new mirror policy that uses a MAC class

(config)# class mac mac-class-1

(config-class)# match any any arp

(config)# policy mirror “mirror-policy-1”

(policy-mirror)# class mac mac-class-1 action mirror 1
NOTE:

The mirror action can be matched multiple times for the number of mirror sessions available. If there is a maximum of four mirror sessions available, you may have four mirror actions associated with a single class.

Syntax


no default-mac-class action mirror SESSION

The default-mac-class applies an action to the packets that are neither matched nor ignored by any class associated with the mirror policy. The default MAC class is used in a policy that contains only MAC classes.

Create a Mirror policy with a default MAC class

(config)# policy mirror “mirror-policy-1”
(policy-mirror)# default-mac-class action mirror 1
NOTE:

The default-mac-class is to be used only in a policy that contains MAC classes.