Port mirroring, which forwards data traffic from one or more ports to a specified port via a switch or router for traffic monitoring analysis.
The function of mirroring is simply to mirror the monitored traffic to the monitoring port so that the monitored traffic can be faulted, traffic analyzed, and the traffic is backed up, the monitoring port is usually directly connected with the monitoring host.
Take Cisco as an example:
1. Connect to the switch using SSH or Telnetl and enter the user name and password
2. Enter enable, enter the root password into the root user
3. Enter show IP int BRI to see the basic condition of the switch port Fasteehernet represents a Gigabit Ethernet port, Gigabieethernet represents a GBE port
4. Enter Conf t, enter configuration mode
5. Input monitor session 1 source Interface Gigabitethernet 1/0/1-5, set the source mirror port, 1-5 port is the source Mirror Port, Gigabitethernet 1/0/1 represents the Gigabit port 1, 5 back plus RX indicates that only the incoming data is monitored, and the TX indicates that only the data is being sent.
6. Enter Montior Session 1 destination interface Gigabitethernet 1/0/6 and set 6 port as the destination mirror port.
7. Enter exit to exit, enter show monitor to view configuration information
8. If the configuration error, root mode, input CONGF t; input no monitor session 1;
9. If there is no error, enter the WR save configuration.
Switch Port Mirroring