What is port mirroring?
Port mirroring involves sending a copy of network traffic to another device for analysis. In network communications and security, you might want to analyze the traffic in order to troubleshoot, examine response time, and inspect data packets.
How do you set up port mirroring?
Let's say you have a laptop (host) that is trying to communicate with a server through a network device such as a switch. You would enable port mirroring on the switch so that a copy of the network traffic would be sent to a different device, which would be your protocol analyzer. Similarly, when the server responds to the laptop, a copy of that exchange is sent to the protocol analyzer device as well.
Almost all enterprise-class/managed switches support port mirroring.