Enables a port mirroring session, which sends copies of packets that enter or exit one port to another physical port or LAG interface, where the packets can be analyzed.
Global configuration mode
All protocols such as LLDP must be disabled on interfaces that you select to be destination interfaces.
Run the no monitor session session_number command to delete the port mirroring session.
The following example enables session 22 for monitoring traffic from source Ethernet 0/1 to destination Ethernet 0/2 in the egress direction.
device# configure terminal device(config)# monitor session 22 device(config-session-22)# source ethernet 0/1 destination ethernet 0/2 direction tx
The following example enables session 23 for monitoring traffic from source Ethernet 0/1 to destination Ethernet 0/2 in the ingress direction.
device# configure terminal device(config)# monitor session 23 device(config-session-23)# source ethernet 0/1 destination ethernet 0/2 direction rx
The following example enables session 24 for monitoring traffic from source Ethernet 0/1 to destination Ethernet 0/2 in both directions.
device# configure terminal device(config)# monitor session 24 device(config-session-24)# source ethernet 0/1 destination ethernet 0/2 direction both