407
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 an existing mirroring group by its ID in the range of 1 to 6.
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 ports must be of the same type and on the same card. 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.
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] mirroring-group 1 mirroring-port gigabitethernet 1/0/1 both
Related commands
mirroring-group