Syntax
display mirroring-group { group-id | all | local | remote-destination
| remote-source }
View
Any view
Parameter
group-id: Group
number of a port mirroring group, in the range of 1 to 20.
local: Specifies
to display the parameter settings of local port mirroring groups.
remote-destination: Specifies to display the parameter settings of the destination
groups for remote mirroring.
remote-source: Specifies to display the parameter settings of the source groups
for remote mirroring.
all: Specifies
to display the parameter settings of all mirroring groups.
Description
Use the display mirroring-group command
to display the parameter settings of a port mirroring group.
Local mirroring group information includes:
l
Group number
l
Group type: local
l
Group status
l
Information of the source port
l
Information of the destination port
Information of the destination mirroring
group for remote mirroring includes:
l
Group number
l
Group type: remote-destination
l
Group status
l
Information of the destination port
l
Remote-probe VLAN information
Information of the source mirroring group for
remote mirroring includes:
l
Group number
l
Group type: remote-source
l
Group status
l
Information of the source port
l
Information of the reflector port
l
Remote-probe VLAN information
Example
# Display the parameter settings of a port mirroring
group.
<H3C> display mirroring-group all
mirroring-group 2:
type: local
status: active
mirroring port:
GigabitEthernet1/1/1 both
monitor port: GigabitEthernet1/1/4
Syntax
mirroring-group group-id { local | remote-destination
| remote-source }
undo mirroring-group { group-id | all | local | remote-destination
| remote-source }
View
System view
Parameter
group-id: The
number of a port mirroring group, in the range 1 to 20.
local: Specifies
the mirroring group as a local port mirroring group.
remote-destination: Specifies the mirroring group as the destination mirroring group for
remote port mirroring.
remote-source: Specifies the mirroring group as the source mirroring group for
remote mirroring.
all: Specifies
to remove all mirroring groups.
Description
Use the mirroring-group command to
configure a port mirroring group.
Use the undo mirroring-group command
to remove a port mirroring group.
Example
# Configure a port mirroring group on the
local switch.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] mirroring-group 1 local
Syntax
mirroring-group group-id mirroring-port mirroring-port-list { both | inbound | outbound }
undo mirroring-group group-id mirroring-port mirroring-port-list
View
System view/Ethernet port view
Parameter
group-id: The
number of a port mirroring group, in the range 1 to 20.
mirroring-port mirroring-port-list: Specifies a list
of source ports. mirroring-port-list is available in system view only, instead
of in Ethernet port view.
both: Specifies
to mirror the packets received and sent by the port.
inbound: Specifies
to mirror the packets received by the port.
outbound: Specifies
to mirror the packets sent by the port.
Description
Use the mirroring-group mirroring-port
command to configure the source port.
Use the undo mirroring-group
mirroring-port command to remove the configuration of the source port.
Example
# Configure GigabitEthernet1/1/1 as the
source port and mirror all packets received by this port.
<H3C>
system-view
System View: return to User View with
Ctrl+Z.
[H3C] mirroring-group 1 mirroring-port
Gigabitethernet1/1/1 inbound
Syntax
mirroring-group group-id monitor-port monitor-port
undo mirroring-group group-id monitor-port monitor-port
View
System view/Ethernet port view
Parameter
group-id: The
number of a port mirroring group, in the range 1 to 20.
monitor-port monitor-port: Specifies the destination
port for port mirroring. monitor-port is available in system view only, instead
of in Ethernet port view.
Description
Use the mirroring-group monitor-port
command to configure the destination port.
Use the undo mirroring-group
monitor-port to remove the configuration of the destination port.
Note the following when you configure the
destination port:
l
LACP and STP must be disabled on the destination
port.
l
The destination port for remote mirroring must
be an Access port.
l
After a port is configured as a reflector port,
the switch does not allow you to change the port type or its default VLAN ID.
Example
# Configure GigabitEthernet1/1/4 as the source
port
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] mirroring-group 1 monitor-port
Gigabitethernet1/1/4
Syntax
mirroring-group group-id reflector-port reflector-port
undo mirroring-group group-id reflector-port reflector-port
View
System view/Ethernet port view
Parameter
group-id: The
number of a port mirroring group, in the range 1 to 20.
reflector-port reflector-port: Specifies the reflector
port. reflector-port is available in system view only, instead of in
Ethernet port view.
Description
Use the mirroring-group reflector-port
command to specify the reflector port.
Use the undo mirroring-group reflector-port
command to remove the configuration of the reflector port.
Note the following when you configure the
reflector port:
l
The reflector port must be an Access port.
l
LACP and STP must be disabled on the reflector
port.
l
After a port is configured as a reflector port,
the switch does not allow you to change the port type or its default VLAN ID,
or to add it to another VLAN.
l
To mirror tagged packets, you need to configure
VLAN VPN on the reflector port.
Example
# Configure GigabitEthernet1/1/2 as the
reflector port.
<H3C>
system-view
System View: return to User View with
Ctrl+Z.
[H3C] mirroring-group 1
reflector-port GigabitEthernet1/1/2
Syntax
mirroring-group group-id remote-probe vlan remote-probe-vlan-id
undo mirroring-group group-id remote-probe vlan remote-probe-vlan-id
View
System view
Parameter
group-id: The
number of a port mirroring group, in the range 1 to 20.
remote-probe vlan remote-probe-vlan-id: Specifies
the remote-probe VLAN for the mirroring group.
Description
Use the mirroring-group remote-probe
vlan command to specify the remote-probe VLAN for a mirroring group.
Use the undo mirroring-group
remote-probe vlan command to remove the configuration of remote-probe VLAN
for a mirroring group.
Example
# Configure VLAN 100 as the remote-probe
VLAN.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] mirroring-group 1 remote-probe vlan
100
Syntax
mirroring-port { inbound | outbound | both }
undo mirroring-port
View
Ethernet port view
Parameter
inbound | outbound
| both: Direction of mirrored packets. inbound means only to
mirror the packets received by the port; outbound means only to mirror
the packets sent by the port; both means only to mirror all packets
received and sent by the port.
Description
Use the mirroring-port command to
configure the source port.
Use the undo mirroring-port command
to remove the configuration of the source port.
Related command: display mirroring-group
Example
# Configure GigabitEthernet1/1/1 as the
source port and mirror all packets received and sent by this port.
<H3C>
system-view
System View: return to User View with
Ctrl+Z.
[H3C] interface GigabitEthernet1/1/1
[H3C-GigabitEthernet1/1/1] mirroring-port
both
Syntax
monitor-port
undo monitor-port
View
Ethernet port view
Parameter
None
Description
Use the monitor-port command to
configure the destination port.
Use the undo monitor-port command to
remove the configuration of the destination port.
You can only configure one destination port
on a switch, and all mirrored packets will be sent to the destination port.
Related command: display mirroring-group
Example
# Configure GigabitEthernet1/1/4 as the
destination port.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] interface GigabitEthernet1/1/4
[H3C-GigabitEthernet1/1/4] monitor-port
Syntax
remote-probe
vlan enable
undo remote-probe vlan enable
View
VLAN view
Parameter
None
Description
Use the remote-probe vlan enable
command to configure the current VLAN as the remote-probe VLAN.
After this command is executed, the system
first checks whether the current VLAN is a dynamic VLAN. If yes, the command
will fail, and the system prompts “Can not set dynamic VLAN as
remote-probe VLAN!”.
Use the undo remote-probe vlan enable command
to configure the remote-probe VLAN as a normal VLAN.
Before defining the remote-probe VLAN, make
sure that no Access or Hybrid port belongs to this VLAN. If any Trunk port
exists in this VLAN, the port PVID cannot be the ID of remote-probe VLAN. After
setting a VLAN as remote-probe VLAN, it is recommended not to add Access or
Hybrid port to the VLAN.
Example
# Configure VLAN 5 as remote-probe vlan.
<H3C>
system-view
System View: return to User View with
Ctrl+Z.
[H3C] vlan 5
[H3C-vlan5] remote-probe vlan enable