How to configure local traffic mirroring on AR series routers

By configuring local traffic mirroring, you can replicate specific packets transmitted through an interface to local monitoring devices for analysis and surveillance.

Prerequisites
Before configuring local traffic mirroring, ensure that the link protocol state of the interface is Up.

1. Configure the local observing interface.
Background
In local traffic mirroring, monitoring devices are directly connected to the observing interface.
It is recommended that other configurations should not be performed on an interface that is configured as the observing interface to prevent its mirroring function from being affected:
- If not only the mirroring packets but also the packets of other services are transmitted through the observing interface, the source of the packets cannot be distinguished.
- If traffic congests on the observing interface, mirroring packets may be discarded because the priority of the mirroring packets is lower.
Procedure
Run the system-view command to enter the system view.
Run the observe-port interface interface-type interface-number command to configure the local observing interface.


2. Configure traffic mirroring.

Background
In traffic mirroring, the mirroring interface applies a traffic policy that includes traffic mirroring behavior. Packets that are transmitted through the interface and match the traffic classification rules are replicated to the observing interface.

Procedure
a. Configure the traffic classifier.
Run the system-view command to enter the system view.
Run the traffic classifier classifier-name [ operator { and | or } ] command to create a traffic classifier and enter the view of the traffic classifier.
Run the if-match command to configure the matching rule of the traffic classifier based on actual requirements.
Run the quit command to quit the view of the traffic classifier.


b. Configure the traffic behavior.
Run the traffic behavior behavior-name command to create traffic behavior and enter the view of the traffic behavior.
Run the mirror to observe-port command to mirror traffic that matches the rule to the specified observing interface.
Run the quit command to quit the view of the traffic behavior.
Run the quit command to quit the system view.

c. Configure the traffic policy.
Run the system-view command to enter the system view.
Run the traffic policy policy-name command to create a traffic policy and enter the view of the traffic policy, or directly enter the view of an existing traffic policy.
Run the classifier classifier-name behavior behavior-name command to configure the traffic behavior of specified traffic classifiers in the traffic policy, that is, bind the traffic behavior to the specified traffic classifier.
Run the quit command to quit the view of the traffic policy.
Run the quit command to quit the system view.

d. Apply the traffic policy.
Run the system-view command to enter the system view.
Run the interface interface-type interface-number [.subinterface-number ] command to enter the interface view.
Run the traffic-policy policy-name { inbound | outbound } to apply the traffic policy in the inbound or outbound direction of the interface.

Scroll to top