No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

FAQ-How to Use Port Mirroring on the Switch to Capture Packets

Publication Date:  2015-08-10 Views:  57 Downloads:  0
Issue Description
How to Use Port Mirroring on the Switch to Capture Packets?
Solution
Step 1 Run the following command to access the switch.

[Quidway]system

Step 2 Run the following command to set the monitoring port.

[Quidway]observe-port 1 interface ethernet 0/0/20

Only one monitoring port is allowed.

Step 3 Run the following command to set the mirror port.

[Quidway]interface ethernet 0/0/12
[Quidway-Ethernet0/0/1]port-mirroring to observer-port 1 both


Multiple mirror ports are allowed. Three mirroring modes are available: both, inbound, and outbound.
  • both: Data can be transmitted from the computer to the switch and vice versa.
  • inbound: Data can only be transmitted from the computer to the switch.
  • outbound: Data can only be transmitted from the switch to the computer.
The mirror port's mode must be consistent with that of the monitoring port. To check the monitoring port's mode, run the following command:

[Quidway]display port-mirroring

Step 4 Run the following commands to cancel port mirroring.

[Quidway]interface ethernet 0/0/1
[Quidway-Ethernet0/0/1]undo port-mirroring both
[Quidway-Ethernet0/0/1]quit
[Quidway]undo observe-port 1


To cancel port mirroring, disable the monitoring port then the mirror port.

END