Configure local port mirroring in source port mode to enable the server to monitor the bidirectional
•
traffic of the marketing department and the technical department.
Figure 33 Network diagram
Configuration procedure
Create a local mirroring group:
1.
# Create local mirroring group 1.
<DeviceA> system-view
[DeviceA] mirroring-group 1 local
# Configure GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 as source ports and port
GigabitEthernet 1/0/3 as the monitor port.
[DeviceA] mirroring-group 1 mirroring-port GigabitEthernet 1/0/1 GigabitEthernet
1/0/2 both
[DeviceA] mirroring-group 1 monitor-port GigabitEthernet 1/0/3
# Disable the spanning tree feature on the monitor port GigabitEthernet 1/0/3.
[DeviceA] interface GigabitEthernet 1/0/3
[DeviceA-GigabitEthernet1/0/3] undo stp enable
[DeviceA-GigabitEthernet1/0/3] quit
Verify the configurations:
2.
# Display the configuration of all mirroring groups.
[DeviceA] display mirroring-group all
mirroring-group 1:
type: local
status: active
mirroring port:
monitor port: GigabitEthernet1/0/3
After the configurations are completed, you can monitor all the packets received and sent by the
marketing department and the technical department on the server.
GigabitEthernet1/0/1
GigabitEthernet1/0/2
both
both
86