313
Flow mirroring commands
The flow mirroring commands are available on both Layer 2 and Layer 3 Ethernet interfaces. The
term "interface" in this chapter collectively refers to these two types of interfaces. You can use the
port link-mode
command to configure an Ethernet port as a Layer 2 or Layer 3 interface (see
Layer
2—LAN Switching Configuration Guide
).
mirror-to
Use
mirror-to
to configure a mirroring action for a traffic behavior.
Use
undo mirror-to
to delete a mirroring action.
Syntax
mirror-to
{
cpu
|
interface
interface-type
interface-number
}
undo mirror-to
{
cpu
|
interface
interface-type
interface-number
}
Default
No mirroring action is configured for a traffic behavior.
Views
Traffic behavior view
Predefined user roles
network-admin
mdc-admin
Parameters
cpu
: Specifies the CPU of the card that receives the packets matching the criteria defined in the
traffic class.
interface
interface-type
interface-number
: Specifies an interface by its type and number.
Usage guidelines
The switch supports mirroring traffic to multiple interfaces. You can configure multiple actions of
mirroring traffic to these interfaces for a traffic behavior.
Examples
# Create traffic behavior 1 and configure the action of mirroring traffic to the CPU for the traffic
behavior.
<Sysname> system-view
[Sysname] traffic behavior 1
[Sysname-behavior-1] mirror-to cpu
# Create traffic behavior 1 and configure the action of mirroring traffic to GigabitEthernet 1/0/1 for the
traffic behavior.
<Sysname> system-view
[Sysname] traffic behavior 1
[Sysname-behavior-1] mirror-to interface gigabitethernet 1/0/1