Port mirroring lets you troubleshoot switch port transmissions by copying the traffic that passes through one port (the source or mirrored port) and sending the copied transmission to a second port (the destination or mirror) port, where the packets can be examined.
In the following example, the data packets transmitted over port 1 are copied and sent to port 6. To troubleshoot port 1, a PC with packet sniffing software is used to analyze the traffic on port 6 and thereby troubleshoot port 1.
A
target device of port 1 transmissions
B
PC with packet sniffing software connected to port 6, which mirrors port 1 transmissions
Port mirroring does not affect the normal forwarding behavior of the mirrored port. In many switches, you can configure port mirroring so that you can forward and examine:
-
only the incoming packets of a single mirrored port
-
only the outgoing packets of a single mirrored port
-
both the incoming and outgoing packets of a single mirrored port
-
the packets of several mirrored ports—or the whole switch
A packet sniffer’s troubleshooting features should include:
Schneider Electric recommends implementing port mirroring as follows:
-
Use a destination or mirror port only for port mirroring and not for any other purpose. Connect only the PC with packet sniffer to the mirroring port.
-
When configuring the switch, confirm that port mirroring is designed to forward packets—e.g., incoming, outgoing, or both—to meet your requirements.
-
A packet sniffer’s troubleshooting features should include the capabilities of analyzing network performance and monitoring network activity.