02-Traffic Mirroring Commands
Chapters Download (55.4 KB)
Table of Contents
1 Traffic Mirroring Configuration Commands
On the S5820X and S5800 series switches, traffic mirroring is achieved mainly through QoS policies. For QoS policy configuration commands, see QoS Configuration Approaches in the Configuration Guide - Part 7 - ACL - QoS.
Syntax
mirror-to cpu
undo mirror-to cpu
View
Traffic behavior view
Default Level
2: System level
Parameters
cpu: Mirrors traffic to the CPU.
Description
Use the mirror-to cpu command to configure the mirror-to-CPU action.
Use the undo mirror-to cpu command to delete the action.
By default, a traffic behavior does not contain the mirror-to-CPU action.
Mirror-to-interface and mirror-to-CPU actions are mutually exclusive. You cannot configure both actions in a traffic behavior.
Examples
# Configure the mirror-to-CPU action in traffic behavior 1.
<Sysname> system-view
[Sysname] traffic behavior 1
[Sysname-behavior-1] mirror-to cpu
Syntax
mirror-to interface interface-type interface-number
undo mirror-to interface interface-type interface-number
View
Traffic behavior view
Default Level
2: System level
Parameters
interface-type interface-number: Specifies an interface by its type and number.
Description
Use the mirror-to interface command to configure the action of mirroring traffic to a specified interface.
Use the undo mirror-to interface command to delete the action.
By default, a traffic behavior does not contain any mirror-to-interface action.
Mirror-to-interface and mirror-to-CPU actions are mutually exclusive. You cannot configure both actions in a traffic behavior.
Examples
# Configure the action of mirroring traffic to GigabitEthernet 1/0/1 in traffic behavior 1.
<Sysname> system-view
[Sysname] traffic behavior 1
[Sysname-behavior-1] mirror-to interface GigabitEthernet 1/0/1