Switch——PC with wireshark
1. Use the PC Ethernet port to connect to the switch port (which is free)
2. Configure the mirroring command on the switch:
#
mirroring-group 1 local // Create a local mirror group with group number 1
#
interface GigabitEthernet1/0/1 // The port on which the packet is to be captured
mirroring-group 1 mirroring-port both
#
interface GigabitEthernet1/0/6 // The port on which connect for your PC
mirroring-group 1 monitor-port
#
3. Check the mirroring group information
[H3C]dis mirroring-group all
Mirroring group 1:
Type: Local
Status: Active
Mirroring port:
GigabitEthernet1/0/1 Both
Monitor port: GigabitEthernet1/0/6
3. Configure the same gateway IP address on the PC
4. Open the Wireshark software and collect the packet
Ensure PC connectivity to the switch.