A SERVICE OF

logo

1-9
Configuration procedure
Follow these steps to configure VLAN-based mirroring:
To do… Use the command… Remarks
Enter system view
system-view
Create a local or remote source
mirroring group
mirroring-group group-id
{ local | remote-source }
Required
Configuring VLAN-Based
Mirroring
mirroring-group group-id
mirroring-vlan vlan-id
inbound
Required
Configure the destination port
for the mirroring group
mirroring-group group-id
monitor-port monitor-port-id
Required
Note that you need not
configure the destination port
on the source switch when
configuring VLAN-based
remote mirroring.
Configuration example
Configure VLAN-based mirroring to mirror packets received on all ports in VLAN 2 to port
GigabitEthernet 1/0/2 on the local device.
Configuration procedure:
<device> system-view
[device] mirroring-group 1 local
[device] mirroring-group 1 mirroring-vlan 2 inbound
[device] mirroring-group 1 monitor-port GigabitEthernet 1/0/2
Displaying and Maintaining Port Mirroring
To do… Use the command… Remarks
Display the information of a
mirroring group.
display mirroring-group
{ group-id | all | local |
remote-destination |
remote-source }
Available in any view
Mirroring Configuration Example
Local Port Mirroring Configuration Example
Network requirements
The departments of a company connect to each other through switches, as shown in Figure 1-3:
z Research and Development (R&D) department is connected to Switch C through GigabitEthernet
1/0/1.
z Marketing department is connected to Switch C through GigabitEthernet 1/0/2.
z Data detection device is connected to Switch C through GigabitEthernet 1/0/3
The administrator wants to monitor the packets received on and sent from the R&D department and the
marketing department through the data detection device.