406
Examples
# Create local mirroring group 1.
<Sysname> system-view
[Sysname] mirroring-group 1 local
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 an existing mirroring group by its ID in the range of 1 to 6.
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.
A port can act as a source port for only one mirroring group.
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] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] mirroring-group 1 mirroring-port both
Related commands
mirroring-group