Configuring a traffic behavior

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Create a traffic behavior and enter traffic behavior view.

traffic behavior behavior-name

By default, no traffic behaviors exist.

3. Configure a mirroring action for the traffic behavior.

  • Mirror traffic to an interface:mirror-to interface interface-type interface-number [ loopback | destination-ip destination-ip-address source-ip source-ip-address [ dscp dscp-value | vlan vlan-id | vrf-instance vrf-name ] * ]

  • Mirror traffic to the CPU:mirror-to cpu

By default, no mirroring actions exist in a traffic behavior.

You can mirror traffic to a maximum of four Ethernet interfaces or Layer 2 aggregate interfaces. If you execute this command multiple times, only the first four configured interfaces take effect.

The output interface associated with the destination IP address specified in the mirror-to interface command does not support ECMP.

4. (Optional.) Display traffic behavior configuration.

display traffic behavior

Available in any view.