Configuring different types of flow mirroring

In a traffic behavior, you can configure only one type of flow mirroring.

Mirroring traffic to an interface

On an HPE 5800 switch, you can configure actions of mirroring matching packets to up to four ports in a traffic behavior. On an HPE 5820X switch, you can configure actions of mirroring matching packets to two ports in a traffic behavior.

To mirror traffic to an interface:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Create a behavior and enter behavior view.

traffic behavior behavior-name

By default, no traffic behavior exists.

For more information about the traffic behavior command, see ACL and QoS Command Reference.

3. Configure the action of mirroring traffic to an interface.

mirror-to interface interface-type interface-number [ destination-ip destination-ip-address source-ip source-ip-address [ dscp dscp-value | vlan vlan-id | vpn-instance vpn-instance-name ] * ]

By default, no mirroring action is configured for a traffic behavior.

To configure actions of mirroring matching packets to multiple ports, execute this command multiple times.

When the destination IP address is specified for mirrored packets, the output interface of the route to the destination address does not support ECMP.

Mirroring traffic to the CPU

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Create a behavior and enter behavior view.

traffic behavior behavior-name

By default, no traffic behavior exists.

For more information about the traffic behavior command, see ACL and QoS Command Reference.

3. Configure the action of mirroring traffic to the CPU.

mirror-to cpu

By default, no mirroring action is configured for a traffic behavior.

The CPU is the CPU of the IRF member device that receives the packets matching the criteria defined in the traffic class.