This section describes how to mirror traffic from a source port to a target port.
Use this command to configure a mirror session. Use the no form to clear a mirror session.
Syntax
port monitor interface [rx | tx | both]
no port monitor interface
- interface
- ethernet unit/port
- unit - This is device 1.
- port - Port number.
- rx - Mirror received packets.
- tx - Mirror transmitted packets.
- both - Mirror both received and transmitted packets.
Default Setting
No mirror session is defined. When enabled, the default mirroring is for both received and transmitted packets.
Command Mode
Interface Configuration (Ethernet, destination port)
Command Usage
Example
The following example configures the switch to mirror all packets from port 5 to port 6:
(config)#interface ethernet 1/6
(config-if)#port monitor ethernet 1/5 both
(config-if)#
Related Commands
Use this command to display mirror information.
Syntax
show port monitor [interface]
- interface
- ethernet unit/port
- unit - This is device 1.
- port - Port number.
Default Setting
Shows configured session.
Command Mode
Privileged Exec
Example
The following shows mirroring configured from port 6 to port 11:
(config)#interface ethernet 1/11
(config-if)#port monitor ethernet 1/6
(config-if)#end
#show port monitor
Port Mirroring
-------------------------------------
Destination port(listen port):Eth1/ 11
Source port(monitored port) :Eth1/ 6
Mode :RX/TX#
Related Commands