- Table of Contents
-
- 01-Access Volume
- 00-Access Volume Organization
- 01-Ethernet Interface Commands
- 02-Link Aggregation Commands
- 03-Port Isolation Commands
- 04-Service Loopback Group Commands
- 05-DLDP Commands
- 06-Smart Link Commands
- 07-LLDP Commands
- 08-VLAN Commands
- 09-GVRP Commands
- 10-QinQ Commands
- 11-BPDU Tunneling Commands
- 12-VLAN Mapping Commands
- 13-Ethernet OAM Commands
- 14-Connectivity Fault Detection Commands
- 15-EPON OLT Commands
- 16-MSTP Commands
- 17-RRPP Commands
- 18-Mirroring Commands
- Related Documents
-
Title | Size | Download |
---|---|---|
18-Mirroring Commands | 72.33 KB |
Table of Contents
1 Port Mirroring Configuration Commands
Port Mirroring Configuration Commands
mirroring-group mirroring-port
mirroring-group monitor-egress
mirroring-group remote-probe vlan
2 Traffic Mirroring Configuration Commands
Port Mirroring Configuration Commands
display mirroring-group
Syntax
display mirroring-group { group-id | all | local | remote-destination | remote-source }
View
Any view
Default Level
2: System level
Parameters
group-id: Port mirroring group number, in the range of 1 to 4.
all: Specifies all the port mirroring groups.
local: Specifies local port mirroring groups.
remote-destination: Specifies remote destination port mirroring groups.
remote-source: Specifies remote source port mirroring groups.
Description
Use the display mirroring-group command to display the information about a port mirroring group or multiple port mirroring groups.
The output information varies with port mirroring group type and is organized by mirroring group numbers.
Examples
# Display the information about all the port mirroring groups.
<Sysname> display mirroring-group all
mirroring-group 1:
type: local
status: active
mirroring port:
GigabitEthernet2/0/1 both
monitor port: GigabitEthernet2/0/10
mirroring-group 2:
type: remote-source
status: active
mirroring port:
GigabitEthernet2/0/3 both
monitor egress port: GigabitEthernet2/0/11
remote-probe vlan: 200
Table 1-1 Description on the fields of the display mirroring-group command
Field |
Description |
mirroring-group |
Port mirroring group number |
type |
Port mirroring group type, which can be local, remote-source, and remote-destination. |
status |
Status of a port mirroring group. “active” for already effective, and “inactive” for not effective yet. |
mirroring port |
Source mirroring port |
monitor port |
Destination mirroring port |
monitor egress port |
Outbound mirroring port |
remote-probe vlan |
Remote mirroring VLAN |
mirroring-group
Syntax
mirroring-group group-id { local | remote-destination | remote-source }
undo mirroring-group { group-id | all | local | remote-destination | remote-source }
View
System view
Default Level
2: System level
Parameters
group-id: Port mirroring group number, in the range of 1 to 4.
all: Removes All the port mirroring groups.
local: Creates/Removes a local port mirroring group.
remote-destination: Creates/Removes a remote destination port mirroring group.
remote-source: Creates/Removes a remote source port mirroring group.
Description
Use the mirroring-group command to create a port mirroring group.
Use the undo mirroring-group command to remove a port mirroring group.
You need to specify the type of the port mirroring group to be created when creating it.
l Use the keyword local to create a local port mirroring group.
l Use the keyword remote-destination to create a remote destination port mirroring group.
l Use the keyword remote-source to create a remote source port mirroring group.
You need to specify the port mirroring group type or the mirroring group number when removing a port mirroring group:
l Use the group-id argument to specify the port mirroring group to be removed.
l Use the all keyword to remove all the port mirroring groups.
l Use the local keyword to remove all the local port mirroring groups.
l Use the remote-destination keyword to remove all the remote destination port mirroring groups.
l Use the remote-source keyword to remove all the remote source mirroring groups.
Examples
# Create a local port mirroring group numbered 1.
<Sysname> system-view
[Sysname] mirroring-group 1 local
# Create remote destination mirroring group numbered 2.
<Sysname> system-view
[Sysname] mirroring-group 2 remote-destination
mirroring-group mirroring-port
Syntax
mirroring-group group-id mirroring-port mirroring-port-list { both | inbound | outbound }
undo mirroring-group group-id mirroring-port mirroring-port-list { both | inbound | outbound }
View
System view
Default Level
2: System level
Parameters
group-id: Port mirroring group number, in the range of 1 to 4.
mirroring-port-list: List of ports to be added to the port mirroring group. You can specify multiple ports by providing this argument in the form of { interface-type interface-number [ to interface-type interface-number ] }&<1-8>, where the interface-type argument is port type, the interface-number argument is the port number, and &<1-8> means that you can provide up to eight port indexes/port index lists for this argument.
both: Specifies to duplicate both inbound and outbound packets.
inbound: Specifies to duplicate inbound packets only.
outbound: Specifies to duplicate outbound packets only.
Description
Use the mirroring-group mirroring-port command to configure source ports for a port mirroring group.
Use the undo mirroring-group mirroring-port command to remove source ports from a port mirroring group.
Note that:
l The source port cannot be a member port of the current mirroring group.
l A remote destination mirroring group cannot contain source mirroring ports.
Examples
# Add ports to port mirroring group 1 as source ports (assuming that port mirroring group 1 already exists).
<Sysname> system-view
[Sysname] mirroring-group 1 mirroring-port Ethernet 2/0/1 to Ethernet 2/0/5 both
# Remove source mirroring ports from port mirroring group 1.
[Sysname] undo mirroring-group 1 mirroring-port Ethernet 2/0/1 to Ethernet 2/0/3 both
mirroring-group monitor-egress
Syntax
l In system view:
mirroring-group group-id monitor-egress monitor-egress-port-id
undo mirroring-group group-id monitor-egress monitor-egress-port-id
l In Ethernet port view:
mirroring-group group-id monitor-egress
undo mirroring-group group-id monitor-egress
View
System view, Ethernet port view
Default Level
2: System level
Parameters
group-id: Port mirroring group number, in the range of 1 to 4.
monitor-egress-port-id: Index of the port to be configured as the outbound mirroring port. You need to provide this argument in the format of { interface-type interface-number }, where interface-type is port type and interface-number is port number.
Description
Use the mirroring-group monitor-egress command to configure a port as the outbound mirroring port of a remote port mirroring group.
Use the undo mirroring-group monitor-egress command to remove the outbound mirroring port configured from a remote port mirroring group.
Note that:
l Only remote source port mirroring groups can have outbound mirroring ports. A port mirroring group can have only one outbound mirroring port.
l The outbound port cannot be a member port of the current mirroring group.
l It is not recommended to configure STP, RSTP, MSTP, 802.1X, IGMP Snooping, static ARP and MAC address learning on the outbound mirroring port; otherwise, the mirroring function may be affected.
Examples
# Configure port Ethernet 2/0/1 as the outbound mirroring port of remote port mirroring group 1 in system view.
<Sysname> system-view
[Sysname] mirroring-group 1 remote-source
[Sysname] mirroring-group 1 monitor-egress Ethernet 2/0/1
# Configure port Ethernet 2/0/2 as the outbound mirroring port of remote port mirroring group 2 in Ethernet port view.
<Sysname> system-view
[Sysname] mirroring-group 2 remote-source
[Sysname] interface Ethernet 2/0/2
[Sysname-Ethernet2/0/2] mirroring-group 2 monitor-egress
mirroring-group monitor-port
Syntax
mirroring-group group-id monitor-port monitor-port-id
undo mirroring-group group-id monitor-port monitor-port-id
View
System view
Default Level
2: System level
Parameters
group-id: Port mirroring group number, in the range of 1 to 4.
monitor-port-id: Port index. You need to provide this argument in the form of interface-type interface-number, where interface-type is the port type and interface-number is the port number.
Description
Use the mirroring-group monitor-port command to configure the destination port for a port mirroring group.
Use the undo mirroring-group monitor-port command to remove the destination port from a port mirroring group.
Note that:
l A port mirroring group can contain only one destination port.
l The destination port cannot be a member port of the current mirroring group.
l The destination mirroring port can be an access, trunk, or hybrid port. It must be assigned to the remote mirroring VLAN.
l A remote source port mirroring group cannot contain destination ports.
l Before configuring the destination port for a port mirroring group, make sure the port mirroring group exists.
l Do not enable STP, RSTP, or MSTP on the destination port. Otherwise, the mirroring function may be affected.
l Do not use the destination mirroring port for any purpose other than port mirroring.
Examples
# Configure Ethernet 2/0/1 as the destination port of port mirroring group 1 (a remote destination port mirroring group).
<Sysname> system-view
[Sysname] mirroring-group 1 remote-destination
[Sysname] mirroring-group 1 monitor-port Ethernet 2/0/1
mirroring-group remote-probe vlan
Syntax
mirroring-group group-id remote-probe vlan rprobe-vlan-id
undo mirroring-group group-id remote-probe vlan rprobe-vlan-id
View
System view
Default Level
2: System level
Parameters
group-id: Port mirroring group number, in the range of 1 to 4.
rprobe-vlan-id: ID of the VLAN to be configured as the remote mirroring VLAN. Note that the VLAN must be an existing static VLAN.
Description
Use the mirroring-group remote-probe vlan command to specify a VLAN as the mirroring VLAN for a remote source port mirroring group or a remote destination port mirroring group.
Use the undo mirroring-group remote-probe vlan command to remove the remote mirroring VLAN from a remote source mirroring group or a remote destination mirroring group.
Note that:
l Only remote source port mirroring groups or remote destination port mirroring groups can have remote mirroring VLANs. A port mirroring group can have only one remote mirroring VLAN.
l To remove a VLAN operating as a remote port mirroring VLAN, you need to restore it to a normal VLAN first. A remote port mirroring group gets invalid if the corresponding remote port mirroring VLAN is removed.
l You are recommended to use a remote mirroring VLAN for remote mirroring only.
Examples
# Specify VLAN 2 as the remote mirroring VLAN of port mirroring group 1 (assuming that VLAN 2 already exists).
<Sysname> system-view
[Sysname] mirroring-group 1 remote-source
[Sysname] mirroring-group 1 remote-probe vlan 2
mirroring-port
Syntax
[ mirroring-group group-id ] mirroring-port { inbound | outbound | both }
undo [ mirroring-group group-id ] mirroring-port { inbound | outbound | both }
View
Ethernet port view
Default Level
2: System level
Parameters
group-id: Port mirroring group number, in the range of 1 to 4.
both: Duplicates both inbound and outbound packets.
inbound: Duplicates the inbound packets only.
outbound: Duplicates the outbound packets only.
Description
Use the mirroring-port command to configure a port as a source mirroring port of a port mirroring group.
Use the undo mirroring-port command to remove a source mirroring port from a port mirroring group.
Note that:
l If you do not specify the mirroring-group group-id keyword-argument combination, these two commands apply to port mirroring group 1.
l The source port cannot be a member port of the current mirroring group.
l A remote destination mirroring group cannot contain source mirroring ports.
Examples
# Configure Ethernet 2/0/1 as a source mirroring port of remote source port mirroring group 2.
<Sysname> system-view
[Sysname] mirroring-group 2 remote-source
[Sysname] interface Ethernet 2/0/1
[Sysname-Ethernet2/0/1] mirroring-group 2 mirroring-port both
monitor-port
Syntax
[ mirroring-group group-id ] monitor-port
undo [ mirroring-group group-id ] monitor-port
View
Ethernet port view
Default Level
2: System level
Parameters
group-id: Port mirroring group number, in the range of 1 to 4.
Description
Use the monitor-port command to configure a port as the destination mirroring port of a port mirroring group.
Use the undo monitor-port command to remove the destination mirroring port from a port mirroring group.
If you do not specify the mirroring-group group-id keyword-argument combination, the monitor-port command adds the current port to port mirroring group 1.
Note that:
l If you do not specify the mirroring-group group-id keyword-argument combination, these two commands apply to port mirroring group 1.
l A remote source mirroring group cannot contain destination mirroring ports.
l Member ports of existing port mirroring groups cannot be destination ports.
l The remote destination mirroring port can be an access, trunk, or hybrid port. It must be assigned to the remote mirroring VLAN.
l Before adding the destination port for a port mirroring group, make sure the port mirroring group exists.
l Do not enable STP, RSTP, or MSTP on the destination port. Otherwise, the mirroring function may be affected.
l Do not use the destination mirroring port for any purpose other than port mirroring.
Examples
# Add port Ethernet 2/0/1 to port mirroring group 1 (a local port mirroring group) as the destination port.
<Sysname> system-view
[Sysname] mirroring-group 1 local
[Sysname] interface Ethernet 2/0/1
[Sysname-Ethernet2/0/1] monitor-port
uni mirroring-port
Syntax
uni uni-number mirroring-port { both | inbound | outbound }
undo uni uni-number mirroring-port
View
Default Level
2: System level
Parameters
uni-number: UNI number, in the range 1 to the number of UNI ports of the current ONU. The number of UNIs can be up to 80.
both: Mirrors both inbound and outbound packets on the port.
inbound: Mirrors only inbound packets on the port.
outbound: Mirrors only outbound packets on the port.
Description
Use the uni mirroring-port command to configure a UNI as the mirroring port.
Use the undo uni mirroring-port command to cancel the configuration of a UNI as the mirroring port.
Examples
# Mirror the outbound packets on UNI 1.
<Sysname> system-view
[Sysname] interface onu 2/0/1:1
[Sysname-Onu2/0/1:1] uni 1 mirroring-port outbound
uni monitor-port
Syntax
uni uni-number monitor-port
undo uni uni-number monitor-port
View
ONU port view
Default Level
2: System level
Parameters
uni-number: UNI number, in the range 1 to the number of UNI ports of the current ONU. The number of UNIs can be up to 80.
Description
Use the uni monitor-port command to configure a UNI as the monitor port.
Use the undo uni monitor-port command to cancel the configuration of a UNI as the monitor port.
Examples
# Mirror the outbound packets on UNI 1 to UNI 2.
<Sysname> system-view
[Sysname] interface onu 2/0/1:1
[Sysname-Onu2/0/1:1] uni 1 mirroring-port outbound
[Sysname-Onu2/0/1:1] uni 2 monitor-port
On the S7500E series switches, traffic mirroring is achieved mainly through QoS policies and remote port mirroring. For QoS policy configuration commands, refer to QoS Commands in the QoS Volume.