
176
Layer 2 remote port mirroring configuration example
Network requirements
As shown in
, configure Layer 2 remote port mirroring so the server can monitor the
bidirectional traffic of the Marketing department.
Figure 61 Network diagram
Configuration procedure
1.
Configure Device C (the destination device):
# Configure Ten-GigabitEthernet 1/0/1 as a trunk port to permit the packets from VLAN 2 to
pass through.
<DeviceC> system-view
[DeviceC] interface ten-gigabitethernet 1/0/1
[DeviceC-Ten-GigabitEthernet1/0/1] port link-type trunk
[DeviceC-Ten-GigabitEthernet1/0/1] port trunk permit vlan 2
[DeviceC-Ten-GigabitEthernet1/0/1] quit
# Create a remote destination group.
[DeviceC] mirroring-group 2 remote-destination
# Create VLAN 2.
[DeviceC] vlan 2
# Disable MAC address learning for VLAN 2.
[DeviceC-vlan2] undo mac-address mac-learning enable
[DeviceC-vlan2] quit
# Configure VLAN 2 as the remote probe VLAN and Ten-GigabitEthernet 1/0/2 as the monitor
port of the mirroring group.
[DeviceC] mirroring-group 2 remote-probe vlan 2
[DeviceC] interface ten-gigabitethernet 1/0/2
[DeviceC-Ten-GigabitEthernet1/0/2] mirroring-group 2 monitor-port
# Disable the spanning tree feature on Ten-GigabitEthernet 1/0/2.
[DeviceC-Ten-GigabitEthernet1/0/2] undo stp enable
# Assign Ten-GigabitEthernet 1/0/2 to VLAN 2 as an access port.
[DeviceC-Ten-GigabitEthernet1/0/2] port access vlan 2
[DeviceC-Ten-GigabitEthernet1/0/2] quit
2.
Configure Device B (the intermediate device):
Source
device
Device A
XGE1/0/1
XGE1/0/2
Server
Marketing
Dept.
Intermediate
device
Device B
Destination
device
Device C
XGE1/0/1
XGE1/0/2
XGE1/0/1
XGE1/0/2
Source port
Monitor port
Egress port
Common port
VLAN 2
VLAN 2