309
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 4.
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.
A Layer 2 interface cannot be configured as a source port for a mirroring group.
Do not assign a source port of a mirroring group to the remote probe VLAN of the mirroring group.
A port can be assigned to different mirroring groups as follows:
• When acting as a source port for unidirectional mirroring, the port can be assigned to up to four
mirroring groups.
• When acting as a source port for bidirectional mirroring, the port can be assigned to up to two
mirroring groups.
• When acting as a source port for unidirectional and bidirectional mirroring, the port can be
assigned to up to three mirroring groups. One mirroring group is used for bidirectional mirroring
and the other two for unidirectional mirroring.
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 the 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
# Create remote source group 2 to monitor the bidirectional traffic of the port GigabitEthernet 1/0/2.
<Sysname> system-view
[Sysname] mirroring-group 2 remote-source
[Sysname] interface gigabitethernet 1/0/2
[Sysname-GigabitEthernet1/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