- Table of Contents
-
- 14-Network Management and Monitoring Command Reference
- 00-Preface
- 01-System maintenance and debugging commands
- 02-NQA commands
- 03-iNQA commands
- 04-iFIT commands
- 05-SRPM commands
- 06-NTP commands
- 07-PTP commands
- 08-Network synchronization commands
- 09-SNMP commands
- 10-RMON commands
- 11-NETCONF commands
- 12-CWMP commands
- 13-EAA commands
- 14-Process monitoring and maintenance commands
- 15-Sampler commands
- 16-Mirroring commands
- 17-NetStream commands
- 18-IPv6 NetStream commands
- 19-TCP connection trace commands
- 20-Performance management commands
- 21-Flow log commands
- 22-Information center commands
- 23-Packet capture commands
- 24-Flow monitor commands
- Related Documents
-
Title | Size | Download |
---|---|---|
16-Mirroring commands | 171.28 KB |
display mirroring-group car interface
mirroring-group car (interface view)
mirroring-group car (system view)
mirroring-group mirroring-port (interface view)
mirroring-group mirroring-port (system view)
mirroring-group monitor-egress
mirroring-group monitor-port (interface view)
mirroring-group monitor-port (system view)
mirroring-group reflector-port
mirroring-group remote-probe vlan
Port mirroring commands
display mirroring-group
Use display mirroring-group to display mirroring group information.
Syntax
display mirroring-group { group-id | all | local | remote-destination | remote-source }
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
group-id: Specifies a mirroring group by its number. The value range for this argument is 1 to 128.
all: Specifies all mirroring groups.
local: Specifies local mirroring groups.
remote-destination: Specifies remote destination groups.
remote-source: Specifies remote source 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: Ten-GigabitEthernet3/0/1 Inbound
Monitor port: Ten-GigabitEthernet3/0/2 pop-label
Table 1 Command output
Field |
Description |
Mirroring group |
Number of the mirroring group. |
Type |
Type of the mirroring group: · Local. · Remote source. · Remote destination. |
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. |
Mirroring port |
Source port, which might be followed by the following keywords: · Both—Mirrors both the received and the sent packets of the interface. · Inbound—Mirrors the received packets of the interface. · Outbound—Mirrors the sent packets of the interface. |
Mirroring CPU |
Source CPU. |
Monitor port |
Destination port and the action taken on mirrored packets. pop-label means to pop out all MPLS labels of mirrored packets. |
display mirroring-group car
Use display mirroring-group car to display the CAR information about port mirroring.
Syntax
display mirroring-group car
Views
Any view
Predefined user roles
network-admin
network-operator
Examples
# Display the CAR information about port mirroring.
<Sysname> display mirroring-group car
Slot No. Direction CIR(kbps) CBS(Bytes)
0 inbound 10000000 2000
0 outbound 10000000 2000
19 inbound 10000000 2000
19 outbound 10000000 2000
Table 2 Command output
Field |
Description |
Direction |
Direction in which CAR is performed for mirrored packets by port mirroring. |
CIR |
Committed information rate in kbps. |
CBS |
Committed burst size (depth of the token bucket for accommodating burst traffic) in bytes. |
Related commands
mirroring-group car
display mirroring-group car interface
Use display mirroring-group car interface to display the CAR information about port mirroring on interfaces.
Syntax
display mirroring-group car interface [ interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify this option, this command displays the CAR configuration and statistics for all interfaces.
Examples
# Display the CAR information about port mirroring on interface Ten-GigabitEthernet 3/0/1.
<Sysname>display mirroring-group car interface ten-gigabitethernet 3/0/1
Port Direction CIR(kbps) CBS(Bytes)
XGE3/0/1 inbound 10000000 16384
XGE3/0/1 outbound 10000000 16384
Related commands
mirroring-group car
mirroring-group
Use mirroring-group to create a mirroring group.
Use undo mirroring-group to delete mirroring groups.
Syntax
mirroring-group group-id { local | remote-destination | remote-source }
undo mirroring-group { group-id | all | local | remote-destination | remote-source }
Default
No mirroring groups exist.
Views
System view
Predefined user roles
network-admin
Parameters
group-id: Specifies a mirroring group by its number in the range of 1 to 128.
local: Specifies local mirroring groups.
remote-destination: Specifies remote destination groups.
remote-source: Specifies remote source groups.
all: Specifies all mirroring groups.
Examples
# Create local mirroring group 1.
<Sysname> system-view
[Sysname] mirroring-group 1 local
mirroring-group car (interface view)
Use mirroring-group car to configure CAR for port mirroring on an interface.
Use undo mirroring-group car to restore the default on an interface.
Syntax
mirroring-group car { inbound | outbound } cir committed-information-rate [ cbs committed-burst-size ]
undo mirroring-group car { inbound | outbound }
Default
CAR is not configured for port mirroring on an interface.
Views
Interface view
Predefined user roles
network-admin
Parameters
inbound: Specifies packets received by mirroring sources.
outbound: Specifies packets sent by mirroring sources.
cir committed-information-rate: Specifies the committed information rate in kbps. The value range is 8 to 1000000.
cbs committed-burst-size: Specifies the committed burst size in bytes. The value range is 512 to 256000000.
Usage guidelines
In the port mirroring scenario, the monitor port might monitor the traffic of multiple mirroring sources at the same time. If the speed of packets received or sent by the mirroring sources are too high, the monitor port might be congested and drop packets. In this case, you can configure this feature on the device where the mirroring sources reside. This feature rate-limits mirrored packets and avoids congestion on the port mirroring network.
You can configure CAR for port mirroring in both system view and interface view. The configuration in interface view takes priority. If the configuration in interface view uses the default settings, the configuration in system view will be used.
Examples
# Configure the CIR as 1000 kbps for the packets received on mirroring source interface Ten-GigabitEthernet 3/0/1 of port mirroring.
<Sysname> system-view
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] mirroring-group car inbound cir 1000
Related commands
display mirroring-group car interface
mirroring-group car (system view)
Use mirroring-group car to configure CAR for port mirroring.
Use undo mirroring-group car to restore the default.
Syntax
mirroring-group car { inbound | outbound } cir committed-information-rate [ cbs committed-burst-size ]
undo mirroring-group car { inbound | outbound }
Default
The CIR is 10000000 kbps and the CBS is 16384 bytes for the packets received and sent by mirroring sources of port mirroring.
Views
System view
Predefined user roles
network-admin
Parameters
inbound: Specifies packets received by mirroring sources.
outbound: Specifies packets sent by mirroring sources.
cir committed-information-rate: Specifies the committed information rate in the range of 1000000 to 100000000 kbps.
cbs committed-burst-size: Specifies the committed burst size in the range of 1000 to 2000000 bytes.
Usage guidelines
In the port mirroring scenario, the monitor port might monitor the traffic of multiple mirroring sources at the same time. If the speed of packets received or sent by the mirroring sources are too high, the monitor port might be congested and drop packets. In this case, you can configure this feature on the device where the mirroring sources reside. This feature rate-limits mirrored packets and avoid congestion on the port mirroring network.
Examples
# Set the CIR to 1000000 kbps and CBS to 16385 bytes for the packets received by mirroring sources of port mirroring.
<Sysname> system
[Sysname] mirroring-group car inbound cir 1000000 cbs 16385
Related commands
display mirroring-group car
mirroring-group mirroring-cpu
Use mirroring-group mirroring-cpu to configure source CPUs for a mirroring group.
Use undo mirroring-group mirroring-cpu to remove source CPUs from a mirroring group.
Syntax
mirroring-group group-id mirroring-cpu slot slot-number-list { both | inbound | outbound }
undo mirroring-group group-id mirroring-cpu slot slot-number-list
Default
No source CPU is configured for a mirroring group.
Views
System view
Predefined user roles
network-admin
Parameters
group-id: Specifies a mirroring group by its number. The specified mirroring group must already exist. The value range for this argument is 1 to 128.
slot slot-number-list: Specifies a space-separated list of up to eight slot number items. An item specifies a card by its slot number or specifies a range of cards in the form of start-slot-number to end-slot-number. The end slot number must be equal to or greater than the start slot number.
both: Mirrors both received and sent packets.
inbound: Mirrors only sent packets.
outbound: Mirrors only received packets.
Usage guidelines
You can configure source CPUs only for local mirroring groups and remote source groups.
Examples
# Create local mirroring group 1 to monitor the bidirectional traffic of the CPU on the specified slot.
<Sysname> system-view
[Sysname] mirroring-group 1 local
[Sysname] mirroring-group 1 mirroring-cpu slot 10 both
mirroring-group
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 number. The specified mirroring group must already exist. The value range for this argument is 1 to 128.
both: Mirrors both received and sent packets.
inbound: Mirrors only received packets.
outbound: Mirrors only sent packets.
Usage guidelines
You can configure source ports only for local mirroring groups and remote source groups.
When a mirroring source port is a Layer 2 or Layer 3 aggregate interface or aggregation member port, you cannot configure a Layer 2 or Layer 3 aggregate interface as the monitor port. Also, when the monitor port is a Layer 2 or Layer 3 aggregate interface, you cannot configure a Layer 2 or Layer 3 aggregate interface or aggregation member port as a mirroring source port.
Do not assign a source port of a mirroring group to the remote probe VLAN of the mirroring group.
A source port cannot be used as a reflector port, monitor port, or egress port.
Examples
# Create local mirroring group 1 to monitor the bidirectional traffic of Ten-GigabitEthernet 3/0/1.
<Sysname> system-view
[Sysname] mirroring-group 1 local
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] mirroring-group 1 mirroring-port both
# Create remote source group 2 to monitor the bidirectional traffic of Ten-GigabitEthernet 3/0/2.
<Sysname> system-view
[Sysname] mirroring-group 2 remote-source
[Sysname] interface ten-gigabitethernet 3/0/2
[Sysname-Ten-GigabitEthernet3/0/2] mirroring-group 2 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 number. The specified mirroring group must already exist. The value range for this argument is 1 to 128.
interface-list: Specifies a space-separated list of up to eight port items. Each item specifies a single port or a port range in the form of interface-type interface-number1 to interface-type interface-number2. The specified interfaces must be of the same type and on the same slot. The value for the interface-number2 argument must be equal to or greater than the value for the interface-number1 argument.
both: Mirrors both received and sent packets.
inbound: Mirrors only received packets.
outbound: Mirrors only sent packets.
Usage guidelines
You can configure source ports only for local mirroring groups and remote source groups.
When a mirroring source port is a Layer 2 or Layer 3 aggregate interface or aggregation member port, you cannot configure a Layer 2 or Layer 3 aggregate interface as the monitor port. Also, when the monitor port is a Layer 2 or Layer 3 aggregate interface, you cannot configure a Layer 2 or Layer 3 aggregate interface or aggregation member port as a mirroring source port.
Do not assign a source port of a mirroring group to the remote probe VLAN of the mirroring group.
A source port cannot be used as a reflector port, monitor port, or egress port.
Examples
# Create local mirroring group 1 to monitor the bidirectional traffic of Ten-GigabitEthernet 3/0/1.
<Sysname> system-view
[Sysname] mirroring-group 1 local
[Sysname] mirroring-group 1 mirroring-port ten-gigabitethernet 3/0/1 both
# Create remote source group 2 to monitor the bidirectional traffic of Ten-GigabitEthernet 3/0/2.
<Sysname> system-view
[Sysname] mirroring-group 2 remote-source
[Sysname] mirroring-group 2 mirroring-port ten-gigabitethernet 3/0/2 both
mirroring-group
mirroring-group monitor-egress
Use mirroring-group monitor-egress to configure the egress port for a remote source group.
Use undo mirroring-group monitor-egress to restore the default.
Syntax
In system view:
mirroring-group group-id monitor-egress interface-type interface-number
undo mirroring-group group-id monitor-egress interface-type interface-number
In interface view:
mirroring-group group-id monitor-egress
undo mirroring-group group-id monitor-egress
Default
No egress port is configured for a remote source group.
Views
System view
Interface view
Predefined user roles
network-admin
Parameters
group-id: Specifies a mirroring group by its number. The specified mirroring group must already exist. The value range for this argument is 1 to 128.
interface-type interface-number: Specifies a port by its type and number.
Usage guidelines
You can configure egress ports only for remote source groups.
For port mirroring to work correctly, disable the following features on the egress port of a mirroring group:
· Spanning tree.
· IGMP snooping.
· Static ARP.
· MAC address learning.
The egress, monitor, or reflector port of an existing mirroring group cannot be configured as an egress port.
The member port of an aggregate interface cannot be configured as an egress port.
Examples
# Create remote source group 1. Configure Ten-GigabitEthernet 3/0/1 as its egress port in system view.
<Sysname> system-view
[Sysname] mirroring-group 1 remote-source
[Sysname] mirroring-group 1 monitor-egress ten-gigabitethernet 3/0/1
# Create remote source group 2. Configure Ten-GigabitEthernet 3/0/2 as its egress port in interface view.
<Sysname> system-view
[Sysname] mirroring-group 2 remote-source
[Sysname] interface ten-gigabitethernet 3/0/2
[Sysname-Ten-GigabitEthernet3/0/2] mirroring-group 2 monitor-egress
Related commands
mirroring-group
mirroring-group monitor-port (interface view)
Use mirroring-group monitor-port to configure a port as a monitor port for a mirroring group.
Use undo mirroring-group monitor-port to restore the default.
Syntax
mirroring-group group-id monitor-port [ pop-label ]
undo mirroring-group group-id monitor-port
Default
A port does not act as a monitor port for any mirroring groups.
Views
Interface view
Predefined user roles
network-admin
Parameters
group-id: Specifies a mirroring group by its number. The specified mirroring group must already exist. The value range for this argument is 1 to 128.
pop-label: Pops out all MPLS labels of packets mirrored to an interface. If you do not specify this keyword, the MPLS labels of mirrored packets are not popped out. Support for this keyword depends on the device model.
Usage guidelines
You can configure monitor ports only for local mirroring groups and remote destination groups.
Follow these guidelines when you configure the MPLS label removal feature by using the pop-label keyword:
· You can specify the pop-label keyword only when specifying a monitor port for a local mirroring group.
· You can also enable a flow mirroring destination interface to remove MPLS labels for mirrored packets by specifying the pop-label keyword in the mirror-to interface command. However, the flow mirroring destination interface removes MPLS labels for mirrored packets whether or not the pop-label keyword is specified if the following conditions are met:
¡ The QoS policy that uses the traffic behavior where the flow mirroring destination interface is specified is applied to the outbound direction of a port.
¡ The outbound traffic of the port is also a mirroring source of a local mirroring group.
¡ The pop-label keyword is specified for the monitor port of the local mirroring group.
· MPLS labels are removed for mirrored packets sent to destinations specified in a QoS policy for NetStream flow mirroring if the following conditions are met:
¡ The QoS policy is applied to the outbound direction of a port.
¡ The outbound traffic of the port is also a mirroring source of a local mirroring group.
¡ The pop-label keyword is specified for the monitor port of the local mirroring group.
· To change the status of the MPLS label removal feature for a monitor port, first remove the monitor port configuration, and then reconfigure the monitor port.
Do not enable the spanning tree feature on the monitor port of a mirroring group.
For a Layer 2 or Layer 3 aggregate interface configured as the monitor port of a mirroring group, do not configure its member ports as source ports of the mirroring group.
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.
The source port of an existing mirroring group cannot be configured as a monitor port.
The member port of an aggregate interface cannot be configured as a monitor port.
The member port of an aggregate interface cannot be configured as a monitor port for a mirroring group.
When the monitor port is a Layer 2 or Layer 3 aggregate interface, you cannot configure a Layer 2 or Layer 3 aggregate interface or aggregation member port as a mirroring source port. When a mirroring source port is a Layer 2 or Layer 3 aggregate interface or aggregation member port, you cannot configure a Layer 2 or Layer 3 aggregate interface as the monitor port.
When you configure a monitor port for a local mirroring group, this command is supported only on Layer 2/Layer 3 physical interfaces, Layer 2/Layer 3 aggregate interfaces, and GRE tunnel interfaces.
Examples
# Create local mirroring group 1 and configure Ten-GigabitEthernet 3/0/1 as its monitor port.
<Sysname> system-view
[Sysname] mirroring-group 1 local
[Sysname] interface ten-gigabitethernet 3/0/1
[Sysname-Ten-GigabitEthernet3/0/1] mirroring-group 1 monitor-port
# Create remote destination group 2 and configure Ten-GigabitEthernet 3/0/2 as its monitor port.
<Sysname> system-view
[Sysname] mirroring-group 2 remote-destination
[Sysname] interface ten-gigabitethernet 3/0/2
[Sysname-Ten-GigabitEthernet3/0/2] mirroring-group 2 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-list [ pop-label ]
undo mirroring-group group-id monitor-port interface-list
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 number. The specified mirroring group must already exist. The value range for this argument is 1 to 128.
interface-list: Specifies a space-separated list of up to eight port items. Each item specifies a single port or a port range in the form of interface-type interface-number1 to interface-type interface-number2. The value for the interface-number2 argument must be equal to or greater than the value for the interface-number1 argument.You can configure multiple monitor ports only for a mirroring group with an ID in the range 1 to 64.
pop-label: Pops out all MPLS labels of packets mirrored to an interface. If you do not specify this keyword, the MPLS labels of mirrored packets are not popped out. Support for this keyword depends on the device model.
Usage guidelines
You can configure monitor ports only for local mirroring groups and remote destination groups.
Follow these guidelines when you configure the MPLS label removal feature by using the pop-label keyword:
· You can specify the pop-label keyword only when specifying a monitor port for a local mirroring group.
· You can also enable a flow mirroring destination interface to remove MPLS labels for mirrored packets by specifying the pop-label keyword in the mirror-to interface command. However, the flow mirroring destination interface removes MPLS labels for mirrored packets whether or not the pop-label keyword is specified if the following conditions are met:
¡ The QoS policy that uses the traffic behavior where the flow mirroring destination interface is specified is applied to the outbound direction of a port.
¡ The outbound traffic of the port is also a mirroring source of a local mirroring group.
¡ The pop-label keyword is specified for the monitor port of the local mirroring group.
· MPLS labels are removed for mirrored packets sent to destinations specified in a QoS policy for NetStream flow mirroring if the following conditions are met:
¡ The QoS policy is applied to the outbound direction of a port.
¡ The outbound traffic of the port is also a mirroring source of a local mirroring group.
¡ The pop-label keyword is specified for the monitor port of the local mirroring group.
· To change the status of the MPLS label removal feature for a monitor port, first remove the monitor port configuration, and then reconfigure the monitor port.
Do not enable the spanning tree feature on the monitor port of a mirroring group.
For a Layer 2 or Layer 3 aggregate interface configured as the monitor port of a mirroring group, do not configure its member ports as source ports of the 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.
The source port of an existing mirroring group cannot be configured as a monitor port.
The member port of an aggregate interface cannot be configured as a monitor port.
The member port of an aggregate interface cannot be configured as a monitor port for a mirroring group.
When the monitor port is a Layer 2 or Layer 3 aggregate interface, you cannot configure a Layer 2 or Layer 3 aggregate interface or aggregation member port as a mirroring source port. When a mirroring source port is a Layer 2 or Layer 3 aggregate interface or aggregation member port, you cannot configure a Layer 2 or Layer 3 aggregate interface as the monitor port.
When you configure multiple Layer 2 monitor ports for a local mirroring group, changing their PVIDs will cause the configured mirroring group to fail. To resolve this issue, first use the undo mirroring-group monitor-port command to delete the existing configuration, and then reconfigure the monitor ports. The supported monitor port types for local mirroring groups on the device are Layer 2/Layer 3 physical interfaces, Layer 2/Layer 3 aggregate interfaces, and GRE tunnel interfaces.
Examples
# Create local mirroring group 1 and configure Ten-GigabitEthernet 3/0/1 as its monitor port.
<Sysname> system-view
[Sysname] mirroring-group 1 local
[Sysname] mirroring-group 1 monitor-port ten-gigabitethernet 3/0/1
# Create remote destination group 2 and configure Ten-GigabitEthernet 3/0/2 as its monitor port.
<Sysname> system-view
[Sysname] mirroring-group 2 remote-destination
[Sysname] mirroring-group 2 monitor-port ten-gigabitethernet 3/0/2
Related commands
mirroring-group
mirroring-group reflector-port
Use mirroring-group reflector-port to configure the reflector port for a remote source group.
Use undo mirroring-group reflector-port to restore the default.
Syntax
In system view:
mirroring-group group-id reflector-port interface-type interface-number
undo mirroring-group group-id reflector-port interface-type interface-number
In Layer 2 interface view:
mirroring-group group-id reflector-port
undo mirroring-group group-id reflector-port
Default
No reflector port is configured for a mirroring group.
Views
System view
Layer 2 interface view
Predefined user roles
network-admin
Parameters
group-id: Specifies a mirroring group by its number. The specified mirroring group must already exist. The value range for this argument is 1 to 128.
interface-type interface-number: Specifies a port by its type and number. In the current software version, only Layer 2 interfaces can be configured as reflector ports.
Usage guidelines
CAUTION: · The port to be configured as a reflector port must be a port not in use. Do not connect a network cable to a reflector port. · When a port is configured as a reflector port, the port restores to the factory default settings. You cannot configure other features on a reflector port. |
You can configure reflector ports only for remote source groups.
You can configure a port as a reflector port only when the port is operating with the default setting of the following parameters:
· Duplex mode.
· Speed.
· MDI settings.
To configure an interface as a reflector port, make sure it supports enabling the loopback feature.
The member port of an aggregate interface can be configured as a reflector port.
Examples
# Create remote source group 1. Configure Ten-GigabitEthernet 3/0/1 as its reflector port in system view.
<Sysname> system-view
[Sysname] mirroring-group 1 remote-source
[Sysname] mirroring-group 1 reflector-port ten-gigabitethernet 3/0/1
This operation may delete all settings made on the interface. Continue? [Y/N]: y
# Create remote source group 2. Configure Ten-GigabitEthernet 3/0/2 as its reflector port in interface view.
<Sysname> system-view
[Sysname] mirroring-group 2 remote-source
[Sysname] interface ten-gigabitethernet 3/0/2
[Sysname-Ten-GigabitEthernet3/0/2] mirroring-group 2 reflector-port
This operation may delete all settings made on the interface. Continue? [Y/N]: y
Related commands
mirroring-group
mirroring-group remote-probe vlan
Use mirroring-group remote-probe vlan to specify a VLAN as the remote probe VLAN for a mirroring group.
Use undo mirroring-group remote-probe vlan to restore the default.
Syntax
mirroring-group group-id remote-probe vlan vlan-id
undo mirroring-group group-id remote-probe vlan vlan-id
Default
No remote probe VLAN is configured for a mirroring group.
Views
System view
Predefined user roles
network-admin
Parameters
group-id: Specifies a mirroring group by its number. The specified mirroring group must already exist. The value range for this argument is 1 to 128.
vlan-id: Specifies a VLAN by its ID.
Usage guidelines
To implement Layer 2 remote port mirroring with the configurable reflector port method, make sure the remote probe VLAN ID is different from any subinterface IDs configured for the following interfaces:
· Physical interfaces on the card where the reflector port resides.
· Layer 3 aggregate interfaces that contain physical interfaces on the card where the reflector port resides.
You can configure remote probe VLANs only for remote source groups and remote destination groups.
When a VLAN is configured as a remote probe VLAN, use the VLAN for port mirroring exclusively.
The remote mirroring groups on the source device and destination device must use the same remote probe VLAN.
Only a static VLAN that already exists can be configured as a remote probe VLAN. A VLAN can be configured as the remote probe VLAN for only one mirroring group.
To delete a VLAN that is configured as a remote probe VLAN, remove the remote probe VLAN configuration first.
Examples
# Create remote source group 1 and configure VLAN 10 as its remote probe VLAN.
<Sysname> system-view
[Sysname] mirroring-group 1 remote-source
[Sysname] mirroring-group 1 remote-probe vlan 10
# Create remote destination group 2 and configure VLAN 20 as its remote probe VLAN.
<Sysname> system-view
[Sysname] mirroring-group 2 remote-destination
[Sysname] mirroring-group 2 remote-probe vlan 20
Related commands
mirroring-group
Flow mirroring commands
display monitoring-group
Use display monitoring-group to display monitoring group information.
Syntax
display monitoring-group { group-id | all }
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
group-id: Specifies a monitoring group by its ID. The value range for this argument is 1 to 64.
all: Specifies all monitoring groups.
Examples
# Display information about all monitoring groups.
<Sysname> display monitoring-group all
Monitoring group 1:
Monitoring ports: Ten-GigabitEthernet3/0/2
Ten-GigabitEthernet3/0/3
Ten-GigabitEthernet3/0/4
Table 3 Command output
Field |
Description |
Monitoring group |
ID of the monitoring group. |
Monitoring ports |
Member ports in the monitoring group. |
mirror-to cpu
Use mirror-to cpu to configure a mirroring action that mirrors traffic to the CPU.
Use undo mirror-to cpu to delete the mirroring action that mirrors traffic to the CPU.
Syntax
mirror-to cpu
undo mirror-to cpu
Default
No mirroring action exists to mirror traffic to the CPU.
Views
Traffic behavior view
Predefined user roles
network-admin
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
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
mirror-to interface interface-type interface-number [ sampler sampler-name ] [ pop-label ]
undo mirror-to interface interface-type interface-number
Default
No mirroring actions exist to mirror traffic to interfaces.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
interface-type interface-number: Mirrors traffic to an interface specified by its type and number.
sampler sampler-name: Specifies a sampler by its name. The sampler-name argument is a case-insensitive string of 1 to 31 characters.
pop-label: Pops out all MPLS labels of packets mirrored to an interface. If you do not specify this keyword, the MPLS labels of mirrored packets are not popped out. Support for this keyword depends on the device model.
Usage guidelines
You can execute this command multiple times for a traffic behavior to mirror traffic to different interfaces.
A sampler selects a packet from sequential packets. Flow mirroring uses a sampler to limit the volume of traffic to be mirrored. It supports using a sampler that has not been created. If you configure multiple samplers for a mirroring action, the most recent configuration takes effect. For more information about samplers, see Network Management and Monitoring Configuration Guide.
Follow these guidelines when you configure MPLS label removal in a traffic behavior to be used by a QoS policy for flow mirroring:
· A flow mirroring destination interface removes MPLS labels for mirrored packets whether or not the pop-label keyword is specified in the mirror-to interface command if the following conditions are met:
¡ The QoS policy that uses the traffic behavior where the flow mirroring destination interface is specified is applied to the outbound direction of a port.
¡ The outbound traffic of the port is also a mirroring source of a local mirroring group.
¡ The pop-label keyword is specified for the monitor port of the local mirroring group.
· MPLS labels are removed for mirrored packets sent to destinations specified in a QoS policy for NetStream flow mirroring if the following conditions are met:
¡ The QoS policy is applied to the outbound direction of a port.
¡ The outbound traffic of the port is also a mirroring source of a local mirroring group.
¡ The pop-label keyword is specified for the monitor port of the local mirroring group.
Examples
# Create traffic behavior 1 and configure the action of mirroring traffic to Ten-GigabitEthernet 3/0/1 for the traffic behavior.
<Sysname> system-view
[Sysname] traffic behavior 1
[Sysname-behavior-1] mirror-to interface ten-gigabitethernet 3/0/1
# Create traffic behavior 1, configure the action of mirroring traffic to Ten-GigabitEthernet 3/0/1, and use sampler samp.
<Sysname> system-view
[Sysname] traffic behavior 1
[Sysname-behavior-1] mirror-to interface ten-gigabitethernet 3/0/1 sampler samp
mirror-to local
Use mirror-to local to configure a mirroring action that mirrors traffic to the slot where the traffic was received or sent out.
Use undo mirror-to local to delete the mirroring action that mirrors traffic to the slot where the traffic was received or sent out.
Syntax
mirror-to local [ sampler sampler-name ]
undo mirror-to local
Default
No mirroring actions exist to mirror traffic to the slot where the traffic was received or sent out.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
sampler sampler-name: Specifies a sampler by its name, a case-insensitive string of 1 to 31 characters.
Usage guidelines
Packets that match the QoS policy configured with this mirroring action are copied to the slot to which the interface where the packets were captured belongs.
A sampler selects a packet from sequential packets. Flow mirroring uses a sampler to limit the volume of traffic to be mirrored. It supports using a sampler that has not been created. If you configure multiple samplers for a mirroring action, 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 slot where the traffic was received or sent out.
<Sysname> system-view
[Sysname] traffic behavior 1
[Sysname-behavior-1] mirror-to local
mirror-to monitoring-group
Use mirror-to monitoring-group to configure a mirroring action that mirrors traffic to a monitoring group.
Use undo mirror-to monitoring-group to delete a mirroring action that mirrors traffic to a monitoring group.
Syntax
mirror-to monitoring-group group-id
undo mirror-to monitoring-group group-id
Default
No mirroring actions exist to mirror traffic to a monitoring group.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
group-id: Specifies a monitoring group by its ID. The value range for this argument is 1 to 64.
Examples
# Create traffic behavior b1 and configure the action of mirroring traffic to monitoring group 1.
<Sysname> system-view
[Sysname] traffic behavior b1
[Sysname-behavior-b1] mirror-to monitoring-group 1
monitoring-group
Use monitoring-group to create a monitoring group and enter its view, or enter the view of an existing monitoring group.
Use undo monitoring-group to delete monitoring groups.
Syntax
monitoring-group group-id
undo monitoring-group { group-id | all }
Default
No monitoring group is created.
Views
System view
Predefined user roles
network-admin
Parameters
group-id: Specifies a monitoring group by its ID. The value range for this argument is 1 to 64.
all: Specifies all monitoring groups.
Examples
# Create monitoring group 1.
<Sysname> system-view
[Sysname] monitoring-group 1
monitoring-port
Use monitoring-port to assign ports to a monitoring group.
Use undo monitoring-port to remove ports from a monitoring group.
Syntax
monitoring-port interface-list
undo monitoring-port interface-list
Default
A monitoring group does not contain any ports.
Views
Monitoring group view
Predefined user roles
network-admin
Parameters
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 ] }&<1-8>. When you specify a range of interfaces, the start interface number must be identical to or lower than the end interface number.
Usage guidelines
Use the ports in a monitoring group only for flow mirroring, so the data monitoring device receives and analyzes only the mirrored traffic.
A source port for flow mirroring cannot be configured as a monitoring group member port.
Examples
# Create monitoring group 1, and assign interfaces Ten-GigabitEthernet 3/0/1 and Ten-GigabitEthernet 3/0/2 to the monitoring group.
<Sysname> system-view
[Sysname] monitoring-group 1
[Sysname-monitoring-group-1] monitoring-port ten-gigabitethernet 3/0/1 to ten-gigabitethernet 3/0/2
# Create monitoring group 3 and assign Ten-GigabitEthernet 3/0/1 to the monitoring group. Encapsulate the mirrored packets with destination IP address 1.1.1.1, source IP address 2.2.2.2, DSCP value 20, and VLAN ID 100. Forward the mirrored packets based on the routing table of the VPN instance named vrf2.
<Sysname> system-view
[Sysname] monitoring-group 1
[Sysname-monitoring-group-3] monitoring-port ten-gigabitethernet 3/0/1 destination-ip 1.1.1.1 source-ip 2.2.2.2 dscp 20 vlan 100 vrf-instance vrf2
Related commands
monitoring-group