Traffic mirroring commands
mirror-to
Use mirror-to to specify the mirroring destination for a traffic behavior.
Use undo mirror-to to cancel the configuration.
Syntax
mirror-to { cpu | interface interface-type interface-number [ sampler sampler-name ] | vlan vlan-id }
undo mirror-to { cpu | interface interface-type interface-number | vlan vlan-id }
Default
No mirroring destination is configured for a traffic behavior.
Views
Traffic behavior view
Predefined user roles
network-admin
mdc-admin
Parameters
cpu: Mirrors traffic to the CPU, which resides in the card configured with traffic mirroring.
interface interface-type interface-number: Mirrors traffic to an interface specified by its type and number.
vlan vlan-id: Mirrors traffic to a VLAN specified by a VLAN ID in the range of 1 to 4094.
sampler sampler name: Specifies a sampler to be referenced by its name. The sampler name argument
is a case-insensitive string of 1 to 31 characters.
Usage guidelines
If your device supports mirroring traffic to multiple interfaces, you can configure the action of mirroring
traffic to multiple interfaces for a traffic behavior. If your device supports mirroring traffic to only one
interface, the most recent configuration takes effect.
If you configure the action of mirroring traffic to a VLAN multiple times for a traffic behavior, the most
recent configuration takes effect.
A sampler selects a packet from among sequential packets. Traffic mirroring references a sampler to limit
the volume of traffic to be mirrored. It supports referencing a sampler that has not been created. If you
configure multiple samplers for traffic mirroring, the most recent configuration takes effect. For more
information about samplers, see Network Management and Monitoring Configuration Guide.
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
192