- Table of Contents
-
- 15-Network Management and Monitoring Command References
- 00-Preface
- 01-System maintenance and debugging commands
- 02-NQA commands
- 03-iNQA commands
- 04-NTP commands
- 05-PoE commands
- 06-SNMP commands
- 07-RMON commands
- 08-Event MIB commands
- 09-NETCONF commands
- 10-SmartMC commands
- 11-CWMP commands
- 12-EAA commands
- 13-Process monitoring and maintenance commands
- 14-Sampler commands
- 15-Mirroring commands
- 16-NetStream commands
- 17-IPv6 NetStream commands
- 18-sFlow commands
- 19-Performance management commands
- 20-Flow log commands
- 21-Information center commands
- 22-Packet capture commands
- 23-Cloud connection commands
- 24-GOLD commands
- 25-eMDI commands
- 26-SQA commands
- 27-Fast log output commands
- 28-iFIT commands
- Related Documents
-
Title | Size | Download |
---|---|---|
15-Mirroring commands | 114.87 KB |
mirroring-group mirroring-port (interface view)
mirroring-group mirroring-port (system view)
mirroring-group monitor-port (interface view)
mirroring-group monitor-port (system view)
Port mirroring commands
display mirroring-group
Use display mirroring-group to display mirroring group information.
Syntax
display mirroring-group { group-id | all | local }
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
group-id: Specifies a mirroring group by its ID.
The following compatibility matrixes show the support of hardware platforms for the value ranges for the mirroring group ID:
Hardware |
Value range |
MSR610 |
1 to 6 |
MSR810, MSR810-W, MSR810-W-DB, MSR810-LM, MSR810-W-LM, MSR810-10-PoE, MSR810-LM-HK, MSR810-W-LM-HK, MSR810-LM-CNDE-SJK, MSR810-CNDE-SJK, MSR810-EI, MSR810-LM-EA, MSR810-LM-EI |
1 to 6 |
MSR810-LMS, MSR810-LUS |
1 to 6 |
MSR810-SI, MSR810-LM-SI |
1 to 6 |
MSR810-LMS-EA, MSR810-LME |
1 to 6 |
MSR1004S-5G, MSR1004S-5G-CN |
1 to 6 |
MSR1104S-W, MSR1104S-W-CAT6, MSR1104S-5G-CN, MSR1104S-W-5G-CN |
1 to 6 |
MSR2600-6-X1, MSR2600-15-X1, MSR2600-15-X1-T |
1 to 6 |
MSR2600-10-X1 |
1 to 6 |
MSR2630 |
1 to 6 |
MSR3600-28, MSR3600-51 |
1 to 6 |
MSR3600-28-SI, MSR3600-51-SI |
1 to 6 |
MSR3600-28-X1, MSR3600-28-X1-DP, MSR3600-51-X1, MSR3600-51-X1-DP |
1 to 6 |
MSR3600-28-G-DP, MSR3600-51-G-DP |
1 to 4 |
MSR3610-I-DP, MSR3610-IE-DP, MSR3610-IE-ES, MSR3610-IE-EAD, MSR-EAD-AK770, MSR3610-I-IG, MSR3610-IE-IG |
1 to 6 |
MSR3610-X1, MSR3610-X1-DP, MSR3610-X1-DC, MSR3610-X1-DP-DC, MSR3620-X1, MSR3640-X1 |
1 to 6 |
MSR3610, MSR3620, MSR3620-DP, MSR3640, MSR3660 |
1 to 6 |
MSR3610-G, MSR3620-G |
1 to 6 |
MSR3640-G |
1 to 6 |
MSR3640-X1-HI |
1 to 4 |
Hardware |
Value range |
MSR810-W-WiNet, MSR810-LM-WiNet |
1 to 6 |
MSR830-4LM-WiNet |
1 to 6 |
MSR830-5BEI-WiNet, MSR830-6EI-WiNet, MSR830-10BEI-WiNet |
1 to 6 |
MSR830-6BHI-WiNet, MSR830-10BHI-WiNet |
1 to 6 |
MSR2600-6-WiNet |
1 to 6 |
MSR2600-10-X1-WiNet |
1 to 6 |
MSR2630-WiNet |
1 to 6 |
MSR3600-28-WiNet |
1 to 6 |
MSR3610-X1-WiNet |
1 to 6 |
MSR3610-WiNet, MSR3620-10-WiNet, MSR3620-DP-WiNet, MSR3620-WiNet, MSR3660-WiNet |
1 to 6 |
Hardware |
Value range |
MSR860-6EI-XS |
1 to 6 |
MSR860-6HI-XS |
1 to 6 |
MSR2630-XS |
1 to 6 |
MSR3600-28-XS |
1 to 6 |
MSR3610-XS |
1 to 6 |
MSR3620-XS |
1 to 6 |
MSR3610-I-XS |
1 to 6 |
MSR3610-IE-XS |
1 to 6 |
MSR3620-X1-XS |
1 to 6 |
MSR3640-XS |
1 to 6 |
MSR3660-XS |
1 to 4 |
Hardware |
Value range |
MSR810-LM-GL |
1 to 6 |
MSR810-W-LM-GL |
1 to 6 |
MSR830-6EI-GL |
1 to 6 |
MSR830-10EI-GL |
1 to 6 |
MSR830-6HI-GL |
1 to 6 |
MSR830-10HI-GL |
1 to 6 |
MSR1004S-5G-GL |
1 to 6 |
MSR2600-6-X1-GL |
1 to 6 |
MSR3600-28-SI-GL |
1 to 6 |
all: Specifies all mirroring groups.
local: Specifies local mirroring groups.
Usage guidelines
Mirroring group information includes the type, status, and content of a mirroring group. It is sorted by mirroring group number.
Examples
# Display information about all mirroring groups.
<Sysname> display mirroring-group all
Mirroring group 1:
Type: Local
Status: Active
Mirroring port:
GigabitEthernet1/0/1 Inbound
Monitor port: GigabitEthernet1/0/2
Table 1 Command output
Field |
Description |
Mirroring group |
ID of the mirroring group. |
Type |
Type of the mirroring group: · Local. |
Status |
Status of the mirroring group: · Active—The mirroring group has taken effect. · Incomplete—The mirroring group configuration is not complete and does not take effect. |
Keep-link-header |
Whether to keep the source and destination MAC addresses unchanged in mirrored packets when the packets are being transmitted: · Yes. · No. |
Mirroring port |
Source port. |
Monitor port |
Destination port. |
mirroring-group
Use mirroring-group to create a mirroring group.
Use undo mirroring-group to delete mirroring groups.
Syntax
mirroring-group group-id local [ keep-link-header ]
undo mirroring-group { group-id | all | local [ keep-link-header ] }
Default
No mirroring groups exist.
Views
System view
Predefined user roles
network-admin
Parameters
group-id: Specifies a mirroring group ID. The value range for this argument varies by device model. For more information, see the display mirroring-group command.
local: Specifies local mirroring groups.
keep-link-header: Keeps the source and destination MAC addresses unchanged in mirrored packets. If you do not specify this keyword, the source and destination MAC addresses in mirrored packets will change when the mirrored packets are being transmitted.
all: Specifies all mirroring groups.
Examples
# Create local mirroring group 1.
<Sysname> system-view
[Sysname] mirroring-group 1 local
# Create local mirroring group 2, and keep the source and destination MAC addresses unchanged in the mirrored packets when the mirrored packets are being transmitted.
<Sysname> system-view
[Sysname] mirroring-group 2 local keep-link-header
mirroring-group mirroring-port (interface view)
Use mirroring-group mirroring-port to configure a port as a source port for a mirroring group.
Use undo mirroring-group mirroring-port to restore the default.
Syntax
mirroring-group group-id mirroring-port { both | inbound | outbound }
undo mirroring-group group-id mirroring-port
Default
A port does not act as a source port for any mirroring groups.
Views
Interface view
Predefined user roles
network-admin
Parameters
group-id: Specifies a mirroring group by its ID.
The following compatibility matrixes show the support of hardware platforms for the value ranges for the mirroring group ID:
Hardware |
Value range |
MSR610 |
1 to 6 |
MSR810, MSR810-W, MSR810-W-DB, MSR810-LM, MSR810-W-LM, MSR810-10-PoE, MSR810-LM-HK, MSR810-W-LM-HK, MSR810-LM-CNDE-SJK, MSR810-CNDE-SJK, MSR810-EI, MSR810-LM-EA, MSR810-LM-EI |
1 to 6 |
MSR810-LMS, MSR810-LUS |
1 to 6 |
MSR810-SI, MSR810-LM-SI |
1 to 6 |
MSR810-LMS-EA, MSR810-LME |
1 to 6 |
MSR1004S-5G, MSR1004S-5G-CN |
1 to 6 |
MSR1104S-W, MSR1104S-W-CAT6, MSR1104S-5G-CN, MSR1104S-W-5G-CN |
1 to 6 |
MSR2600-6-X1, MSR2600-15-X1, MSR2600-15-X1-T |
1 to 6 |
MSR2600-10-X1 |
1 to 6 |
MSR2630 |
1 to 6 |
MSR3600-28, MSR3600-51 |
1 to 6 |
MSR3600-28-SI, MSR3600-51-SI |
1 to 6 |
MSR3600-28-X1, MSR3600-28-X1-DP, MSR3600-51-X1, MSR3600-51-X1-DP |
1 to 6 |
MSR3600-28-G-DP, MSR3600-51-G-DP |
1 to 4 |
MSR3610-I-DP, MSR3610-IE-DP, MSR3610-IE-ES, MSR3610-IE-EAD, MSR-EAD-AK770, MSR3610-I-IG, MSR3610-IE-IG |
1 to 6 |
MSR3610-X1, MSR3610-X1-DP, MSR3610-X1-DC, MSR3610-X1-DP-DC, MSR3620-X1, MSR3640-X1 |
1 to 6 |
MSR3610, MSR3620, MSR3620-DP, MSR3640, MSR3660 |
1 to 6 |
MSR3610-G, MSR3620-G |
1 to 6 |
MSR3640-G |
1 to 6 |
MSR3640-X1-HI |
1 to 4 |
Hardware |
Value range |
MSR810-W-WiNet, MSR810-LM-WiNet |
1 to 6 |
MSR830-4LM-WiNet |
1 to 6 |
MSR830-5BEI-WiNet, MSR830-6EI-WiNet, MSR830-10BEI-WiNet |
1 to 6 |
MSR830-6BHI-WiNet, MSR830-10BHI-WiNet |
1 to 6 |
MSR2600-6-WiNet |
1 to 6 |
MSR2600-10-X1-WiNet |
1 to 6 |
MSR2630-WiNet |
1 to 6 |
MSR3600-28-WiNet |
1 to 6 |
MSR3610-X1-WiNet |
1 to 6 |
MSR3610-WiNet, MSR3620-10-WiNet, MSR3620-DP-WiNet, MSR3620-WiNet, MSR3660-WiNet |
1 to 6 |
Hardware |
Value range |
MSR860-6EI-XS |
1 to 6 |
MSR860-6HI-XS |
1 to 6 |
MSR2630-XS |
1 to 6 |
MSR3600-28-XS |
1 to 6 |
MSR3610-XS |
1 to 6 |
MSR3620-XS |
1 to 6 |
MSR3610-I-XS |
1 to 6 |
MSR3610-IE-XS |
1 to 6 |
MSR3620-X1-XS |
1 to 6 |
MSR3640-XS |
1 to 6 |
MSR3660-XS |
1 to 4 |
Hardware |
Value range |
MSR810-LM-GL |
1 to 6 |
MSR810-W-LM-GL |
1 to 6 |
MSR830-6EI-GL |
1 to 6 |
MSR830-10EI-GL |
1 to 6 |
MSR830-6HI-GL |
1 to 6 |
MSR830-10HI-GL |
1 to 6 |
MSR1004S-5G-GL |
1 to 6 |
MSR2600-6-X1-GL |
1 to 6 |
MSR3600-28-SI-GL |
1 to 6 |
both: Mirrors both received and sent packets.
inbound: Mirrors only received packets.
outbound: Mirrors only sent packets.
Usage guidelines
A source port cannot be used as a monitor port.
When you configure a software forwarding interface as a source port for a mirroring group, the following rules apply:
· If the software forwarding interface operates in Layer 2 mode, the inbound and outbound IPv4 traffic, IPv6 traffic, and MPLS traffic of the interface will be mirrored.
· If the software forwarding interface operates in Layer 3 mode, the inbound and outbound IPv4 traffic, IPv6 traffic, and MPLS traffic of the interface will be mirrored. Make sure the interface has an IPv4 or IPv6 address.
When you configure a hardware forwarding interface as a source port for a mirroring group, the types of traffic that can be mirrored vary by switching chip.
Both software and hardware forwarding interfaces are an Ethernet interfaces. You can use the port link-mode command to change the link mode of an Ethernet interface. For more information, see Ethernet interface configuration in Interface Configuration Guide.
Examples
# Create local mirroring group 1 to monitor the bidirectional traffic of port GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] mirroring-group 1 local
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] mirroring-group 1 mirroring-port both
Related commands
mirroring-group
mirroring-group mirroring-port (system view)
Use mirroring-group mirroring-port to configure source ports for a mirroring group.
Use undo mirroring-group mirroring-port to remove source ports from a mirroring group.
Syntax
mirroring-group group-id mirroring-port interface-list { both | inbound | outbound }
undo mirroring-group group-id mirroring-port interface-list
Default
No source port is configured for a mirroring group.
Views
System view
Predefined user roles
network-admin
Parameters
group-id: Specifies a mirroring group by its ID.
The following compatibility matrixes show the support of hardware platforms for the value ranges for the mirroring group ID:
Hardware |
Value range |
MSR610 |
1 to 6 |
MSR810, MSR810-W, MSR810-W-DB, MSR810-LM, MSR810-W-LM, MSR810-10-PoE, MSR810-LM-HK, MSR810-W-LM-HK, MSR810-LM-CNDE-SJK, MSR810-CNDE-SJK, MSR810-EI, MSR810-LM-EA, MSR810-LM-EI |
1 to 6 |
MSR810-LMS, MSR810-LUS |
1 to 6 |
MSR810-SI, MSR810-LM-SI |
1 to 6 |
MSR810-LMS-EA, MSR810-LME |
1 to 6 |
MSR1004S-5G, MSR1004S-5G-CN |
1 to 6 |
MSR1104S-W, MSR1104S-W-CAT6, MSR1104S-5G-CN, MSR1104S-W-5G-CN |
1 to 6 |
MSR2600-6-X1, MSR2600-15-X1, MSR2600-15-X1-T |
1 to 6 |
MSR2600-10-X1 |
1 to 6 |
MSR2630 |
1 to 6 |
MSR3600-28, MSR3600-51 |
1 to 6 |
MSR3600-28-SI, MSR3600-51-SI |
1 to 6 |
MSR3600-28-X1, MSR3600-28-X1-DP, MSR3600-51-X1, MSR3600-51-X1-DP |
1 to 6 |
MSR3600-28-G-DP, MSR3600-51-G-DP |
1 to 4 |
MSR3610-I-DP, MSR3610-IE-DP, MSR3610-IE-ES, MSR3610-IE-EAD, MSR-EAD-AK770, MSR3610-I-IG, MSR3610-IE-IG |
1 to 6 |
MSR3610-X1, MSR3610-X1-DP, MSR3610-X1-DC, MSR3610-X1-DP-DC, MSR3620-X1, MSR3640-X1 |
1 to 6 |
MSR3610, MSR3620, MSR3620-DP, MSR3640, MSR3660 |
1 to 6 |
MSR3610-G, MSR3620-G |
1 to 6 |
MSR3640-G |
1 to 6 |
MSR3640-X1-HI |
1 to 4 |
Hardware |
Value range |
MSR810-W-WiNet, MSR810-LM-WiNet |
1 to 6 |
MSR830-4LM-WiNet |
1 to 6 |
MSR830-5BEI-WiNet, MSR830-6EI-WiNet, MSR830-10BEI-WiNet |
1 to 6 |
MSR830-6BHI-WiNet, MSR830-10BHI-WiNet |
1 to 6 |
MSR2600-6-WiNet |
1 to 6 |
MSR2600-10-X1-WiNet |
1 to 6 |
MSR2630-WiNet |
1 to 6 |
MSR3600-28-WiNet |
1 to 6 |
MSR3610-X1-WiNet |
1 to 6 |
MSR3610-WiNet, MSR3620-10-WiNet, MSR3620-DP-WiNet, MSR3620-WiNet, MSR3660-WiNet |
1 to 6 |
Hardware |
Value range |
MSR860-6EI-XS |
1 to 6 |
MSR860-6HI-XS |
1 to 6 |
MSR2630-XS |
1 to 6 |
MSR3600-28-XS |
1 to 6 |
MSR3610-XS |
1 to 6 |
MSR3620-XS |
1 to 6 |
MSR3610-I-XS |
1 to 6 |
MSR3610-IE-XS |
1 to 6 |
MSR3620-X1-XS |
1 to 6 |
MSR3640-XS |
1 to 6 |
MSR3660-XS |
1 to 4 |
Hardware |
Value range |
MSR810-LM-GL |
1 to 6 |
MSR810-W-LM-GL |
1 to 6 |
MSR830-6EI-GL |
1 to 6 |
MSR830-10EI-GL |
1 to 6 |
MSR830-6HI-GL |
1 to 6 |
MSR830-10HI-GL |
1 to 6 |
MSR1004S-5G-GL |
1 to 6 |
MSR2600-6-X1-GL |
1 to 6 |
MSR3600-28-SI-GL |
1 to 6 |
interface-list: Specifies a space-separated list of up to eight interface items. Each item specifies an interface by its type and number or specifies a range of interfaces in the form of interface-type interface-number1 to interface-type interface-number2. When you specify a range of interfaces, the interfaces must be of the same type and on the same slot. The start interface number must be identical to or lower than the end interface number.
both: Mirrors both received and sent packets.
inbound: Mirrors only received packets.
outbound: Mirrors only sent packets.
Usage guidelines
A port can act as a source port for only one mirroring group. A source port cannot be used as a monitor port.
When you configure a software forwarding interface as a source port for a mirroring group, the following rules apply:
· If the software forwarding interface operates in Layer 2 mode, the inbound and outbound IPv4 traffic, IPv6 traffic, and MPLS traffic of the interface will be mirrored.
· If the software forwarding interface operates in Layer 3 mode, the inbound and outbound IPv4 traffic, IPv6 traffic, and MPLS traffic of the interface will be mirrored. Make sure the interface has an IPv4 or IPv6 address.
When you configure a hardware forwarding interface as a source port for a mirroring group, the types of traffic that can be mirrored vary by switching chip.
Both software and hardware forwarding interfaces are an Ethernet interfaces. You can use the port link-mode command to change the link mode of an Ethernet interface. For more information, see Ethernet interface configuration in Interface Configuration Guide.
Examples
# Create local mirroring group 1 to monitor the bidirectional traffic of GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] mirroring-group 1 local
[Sysname] mirroring-group 1 mirroring-port gigabitethernet 1/0/1 both
mirroring-group
mirroring-group monitor-port (interface view)
Use mirroring-group monitor-port to configure a port as the monitor port for a mirroring group.
Use undo mirroring-group monitor-port to restore the default.
Syntax
mirroring-group group-id monitor-port
undo mirroring-group group-id monitor-port
Default
A port does not act as the monitor port for any mirroring groups.
Views
Interface view
Predefined user roles
network-admin
Parameters
group-id: Specifies a mirroring group by its ID..
The following compatibility matrixes show the support of hardware platforms for the value ranges for the mirroring group ID:
Hardware |
Value range |
MSR610 |
1 to 6 |
MSR810, MSR810-W, MSR810-W-DB, MSR810-LM, MSR810-W-LM, MSR810-10-PoE, MSR810-LM-HK, MSR810-W-LM-HK, MSR810-LM-CNDE-SJK, MSR810-CNDE-SJK, MSR810-EI, MSR810-LM-EA, MSR810-LM-EI |
1 to 6 |
MSR810-LMS, MSR810-LUS |
1 to 6 |
MSR810-SI, MSR810-LM-SI |
1 to 6 |
MSR810-LMS-EA, MSR810-LME |
1 to 6 |
MSR1004S-5G, MSR1004S-5G-CN |
1 to 6 |
MSR1104S-W, MSR1104S-W-CAT6, MSR1104S-5G-CN, MSR1104S-W-5G-CN |
1 to 6 |
MSR2600-6-X1, MSR2600-15-X1, MSR2600-15-X1-T |
1 to 6 |
MSR2600-10-X1 |
1 to 6 |
MSR2630 |
1 to 6 |
MSR3600-28, MSR3600-51 |
1 to 6 |
MSR3600-28-SI, MSR3600-51-SI |
1 to 6 |
MSR3600-28-X1, MSR3600-28-X1-DP, MSR3600-51-X1, MSR3600-51-X1-DP |
1 to 6 |
MSR3600-28-G-DP, MSR3600-51-G-DP |
1 to 4 |
MSR3610-I-DP, MSR3610-IE-DP, MSR3610-IE-ES, MSR3610-IE-EAD, MSR-EAD-AK770, MSR3610-I-IG, MSR3610-IE-IG |
1 to 6 |
MSR3610-X1, MSR3610-X1-DP, MSR3610-X1-DC, MSR3610-X1-DP-DC, MSR3620-X1, MSR3640-X1 |
1 to 6 |
MSR3610, MSR3620, MSR3620-DP, MSR3640, MSR3660 |
1 to 6 |
MSR3610-G, MSR3620-G |
1 to 6 |
MSR3640-G |
1 to 6 |
MSR3640-X1-HI |
1 to 4 |
Hardware |
Value range |
MSR810-W-WiNet, MSR810-LM-WiNet |
1 to 6 |
MSR830-4LM-WiNet |
1 to 6 |
MSR830-5BEI-WiNet, MSR830-6EI-WiNet, MSR830-10BEI-WiNet |
1 to 6 |
MSR830-6BHI-WiNet, MSR830-10BHI-WiNet |
1 to 6 |
MSR2600-6-WiNet |
1 to 6 |
MSR2600-10-X1-WiNet |
1 to 6 |
MSR2630-WiNet |
1 to 6 |
MSR3600-28-WiNet |
1 to 6 |
MSR3610-X1-WiNet |
1 to 6 |
MSR3610-WiNet, MSR3620-10-WiNet, MSR3620-DP-WiNet, MSR3620-WiNet, MSR3660-WiNet |
1 to 6 |
Hardware |
Value range |
MSR860-6EI-XS |
1 to 6 |
MSR860-6HI-XS |
1 to 6 |
MSR2630-XS |
1 to 6 |
MSR3600-28-XS |
1 to 6 |
MSR3610-XS |
1 to 6 |
MSR3620-XS |
1 to 6 |
MSR3610-I-XS |
1 to 6 |
MSR3610-IE-XS |
1 to 6 |
MSR3620-X1-XS |
1 to 6 |
MSR3640-XS |
1 to 6 |
MSR3660-XS |
1 to 4 |
Hardware |
Value range |
MSR810-LM-GL |
1 to 6 |
MSR810-W-LM-GL |
1 to 6 |
MSR830-6EI-GL |
1 to 6 |
MSR830-10EI-GL |
1 to 6 |
MSR830-6HI-GL |
1 to 6 |
MSR830-10HI-GL |
1 to 6 |
MSR1004S-5G-GL |
1 to 6 |
MSR2600-6-X1-GL |
1 to 6 |
MSR3600-28-SI-GL |
1 to 6 |
Usage guidelines
You can configure monitor ports only for local mirroring groups and remote destination groups.
Use a monitor port only for port mirroring, so the data monitoring device receives and analyzes only the mirrored traffic.
The member port of an existing mirroring group cannot be configured as a monitor port.
Examples
# Create local mirroring group 1 and configure GigabitEthernet 1/0/1 as its monitor port.
<Sysname> system-view
[Sysname] mirroring-group 1 local
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] mirroring-group 1 monitor-port
Related commands
mirroring-group
mirroring-group monitor-port (system view)
Use mirroring-group monitor-port to configure the monitor ports for a mirroring group.
Use undo mirroring-group monitor-port to remove the monitor ports from a mirroring group.
Syntax
mirroring-group group-id monitor-port interface-type interface-number
undo mirroring-group group-id monitor-port interface-type interface-number
Default
No monitor port is configured for a mirroring group.
Views
System view
Predefined user roles
network-admin
Parameters
group-id: Specifies a mirroring group by its ID.
The following compatibility matrixes show the support of hardware platforms for the value ranges for the mirroring group ID:
Hardware |
Value range |
MSR610 |
1 to 6 |
MSR810, MSR810-W, MSR810-W-DB, MSR810-LM, MSR810-W-LM, MSR810-10-PoE, MSR810-LM-HK, MSR810-W-LM-HK, MSR810-LM-CNDE-SJK, MSR810-CNDE-SJK, MSR810-EI, MSR810-LM-EA, MSR810-LM-EI |
1 to 6 |
MSR810-LMS, MSR810-LUS |
1 to 6 |
MSR810-SI, MSR810-LM-SI |
1 to 6 |
MSR810-LMS-EA, MSR810-LME |
1 to 6 |
MSR1004S-5G, MSR1004S-5G-CN |
1 to 6 |
MSR1104S-W, MSR1104S-W-CAT6, MSR1104S-5G-CN, MSR1104S-W-5G-CN |
1 to 6 |
MSR2600-6-X1, MSR2600-15-X1, MSR2600-15-X1-T |
1 to 6 |
MSR2600-10-X1 |
1 to 6 |
MSR2630 |
1 to 6 |
MSR3600-28, MSR3600-51 |
1 to 6 |
MSR3600-28-SI, MSR3600-51-SI |
1 to 6 |
MSR3600-28-X1, MSR3600-28-X1-DP, MSR3600-51-X1, MSR3600-51-X1-DP |
1 to 6 |
MSR3600-28-G-DP, MSR3600-51-G-DP |
1 to 4 |
MSR3610-I-DP, MSR3610-IE-DP, MSR3610-IE-ES, MSR3610-IE-EAD, MSR-EAD-AK770, MSR3610-I-IG, MSR3610-IE-IG |
1 to 6 |
MSR3610-X1, MSR3610-X1-DP, MSR3610-X1-DC, MSR3610-X1-DP-DC, MSR3620-X1, MSR3640-X1 |
1 to 6 |
MSR3610, MSR3620, MSR3620-DP, MSR3640, MSR3660 |
1 to 6 |
MSR3610-G, MSR3620-G |
1 to 6 |
MSR3640-G |
1 to 6 |
MSR3640-X1-HI |
1 to 4 |
Hardware |
Value range |
MSR810-W-WiNet, MSR810-LM-WiNet |
1 to 6 |
MSR830-4LM-WiNet |
1 to 6 |
MSR830-5BEI-WiNet, MSR830-6EI-WiNet, MSR830-10BEI-WiNet |
1 to 6 |
MSR830-6BHI-WiNet, MSR830-10BHI-WiNet |
1 to 6 |
MSR2600-6-WiNet |
1 to 6 |
MSR2600-10-X1-WiNet |
1 to 6 |
MSR2630-WiNet |
1 to 6 |
MSR3600-28-WiNet |
1 to 6 |
MSR3610-X1-WiNet |
1 to 6 |
MSR3610-WiNet, MSR3620-10-WiNet, MSR3620-DP-WiNet, MSR3620-WiNet, MSR3660-WiNet |
1 to 6 |
Hardware |
Value range |
MSR860-6EI-XS |
1 to 6 |
MSR860-6HI-XS |
1 to 6 |
MSR2630-XS |
1 to 6 |
MSR3600-28-XS |
1 to 6 |
MSR3610-XS |
1 to 6 |
MSR3620-XS |
1 to 6 |
MSR3610-I-XS |
1 to 6 |
MSR3610-IE-XS |
1 to 6 |
MSR3620-X1-XS |
1 to 6 |
MSR3640-XS |
1 to 6 |
MSR3660-XS |
1 to 4 |
Hardware |
Value range |
MSR810-LM-GL |
1 to 6 |
MSR810-W-LM-GL |
1 to 6 |
MSR830-6EI-GL |
1 to 6 |
MSR830-10EI-GL |
1 to 6 |
MSR830-6HI-GL |
1 to 6 |
MSR830-10HI-GL |
1 to 6 |
MSR1004S-5G-GL |
1 to 6 |
MSR2600-6-X1-GL |
1 to 6 |
MSR3600-28-SI-GL |
1 to 6 |
interface-type interface-number: Specifies an interface by its type and number.
Usage guidelines
Do not enable the spanning tree feature on the monitor port of a mirroring group.
Use a monitor port only for port mirroring, so the data monitoring device receives only the mirrored traffic.
The member port of an existing mirroring group cannot be configured as a monitor port.
Examples
# Create local mirroring group 1 and configure GigabitEthernet 1/0/1 as its monitor port.
<Sysname> system-view
[Sysname] mirroring-group 1 local
[Sysname] mirroring-group 1 monitor-port gigabitethernet 1/0/1
Related commands
mirroring-group
Flow mirroring commands
mirror-to interface
Use mirror-to interface to configure a mirroring action that mirrors traffic to an interface.
Use undo mirror-to interface to delete a mirroring action that mirrors traffic to an interface.
Syntax
Syntax I:
mirror-to interface interface-type interface-number [ destination-ip destination-ip-address source-ip source-ip-address [ dscp dscp-value | erspan-id erspan-id-value | vlan vlan-id | vrf-instance vrf-name ] * ] [ destination-mac mac-address ] ]
undo mirror-to interface interface-type interface-number
Syntax II:
mirror-to interface { destination-ip destination-ip-address source-ip source-ip-address } [ dscp dscp-value | erspan-id erspan-id-value | dscp dscp-value | vlan vlan-id | vrf-instance vrf-name ] * [ destination-mac mac-address ]
undo mirror-to interface { destination-ip destination-ip-address source-ip source-ip-address }
Default
No mirroring actions exist to mirror traffic to interfaces.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
interface-type interface-number: Specifies an interface by its type and number.
destination-ip destination-ip-address: Specifies the destination IP address for the mirrored packets.
source-ip source-ip-address: Specifies the source IP address for the mirrored packets.
dscp dscp-value: Specifies the DSCP value for the mirrored packets. The dscp-value argument can be a number in the range of 0 to 63 or a keyword in Table 2.
Table 2 DSCP keywords and values
Keyword |
DSCP value in binary |
DSCP value in decimal |
af11 |
001010 |
10 |
af12 |
001100 |
12 |
af13 |
001110 |
14 |
af21 |
010010 |
18 |
af22 |
010100 |
20 |
af23 |
010110 |
22 |
af31 |
011010 |
26 |
af32 |
011100 |
28 |
af33 |
011110 |
30 |
af41 |
100010 |
34 |
af42 |
100100 |
36 |
af43 |
100110 |
38 |
cs1 |
001000 |
8 |
cs2 |
010000 |
16 |
cs3 |
011000 |
24 |
cs4 |
100000 |
32 |
cs5 |
101000 |
40 |
cs6 |
110000 |
48 |
cs7 |
111000 |
56 |
default |
000000 |
0 |
ef |
101110 |
46 |
vlan vlan-id: Specifies a VLAN by its ID for mirrored packets, in the range of 1 to 4094.
erspan-id erspan-id-value: Specifies the ERSPAN ID for the mirrored packets in the range of 1 to 1023.
vrf-instance vrf-instance-name: Specifies a VPN instance by its name, a case-sensitive string of 1 to 31 characters. The mirrored packets will be forwarded based on the routing table of the specified VPN instance.
destination-mac mac-address: Specifies the destination MAC address for mirrored packets sent to the interface. The mac-address argument is in the format of H-H-H. If you do not specify this option, the device uses the destination IP address to dynamically get the destination MAC address for the mirrored packets.
Usage guidelines
You can execute this command multiple times for a traffic behavior to mirror traffic to different interfaces.
To mirror traffic to the specified interface, use syntax 1.
To mirror traffic to interfaces based on routes matching the specified destination IP address, use syntax 2. When receiving packets that meet the flow mirroring criteria, the device performs the following tasks:
1. Encapsulates the packets based on the configured encapsulation parameters, including the source and destination IP addresses.
2. Searches the routing table for routes matching the configured destination IP address.
3. If ECMP load-balancing is configured, multiple matching ECMP routes might be found for the specified destination IP address.
4. Sends the mirrored packets out of the output interfaces in the matching routes to the final destination.
5. If a selected output interface goes down, the device will send the mirrored packets out of another interface based on the routing metric recalculations.
Examples
# 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
# Create traffic behavior 1, and configure the action of mirroring traffic to GigabitEthernet 1/0/1 for the traffic behavior. Specify the following parameters for the mirrored packets sent to GigabitEthernet 1/0/1:
· Specify 1.1.1.1 and 2.2.2.2 as the destination address and source address, respectively.
· Specify 20, 100, and vrf1 as the DSCP value, VLAN, and the VPN instance name, respectively.
<Sysname> system-view
[Sysname] traffic behavior 1
[Sysname-behavior-1] mirror-to interface gigabitethernet 1/0/1 destination-ip 1.1.1.1 source-ip 2.2.2.2 dscp 20 vlan 100 vrf-instance vrf1