![](/images/new-backgrounds/1149832/149832117x1.webp)
8
Port Mirroring
This section describes the Port Mirroring feature, which can serve as a diagnostic tool, debugging tool, or means of fending off attacks.
Overview
Port mirroring selects network traffic from specific ports for analysis by a network analyzer, while allowing the same traffic to be switched to its destination. You can configure many switch ports as source ports and one switch port as a destination port. You can also configure how traffic is mirrored on a source port. Packets received on the source port, transmitted on a port, or both received and transmitted, can be mirrored to the destination port.
CLI Examples
The following are examples of the commands used in the Port Mirroring feature.
Example #1: Set up a Port Mirroring Session
The following command sequence enables port mirroring and specifies a source and destination ports.
<cr> | Press Enter to | execute | the command. | |
rx | Monitor | ingress packets only. | ||
tx | Monitor | egress | packets | only. |
Overview 59