Use the port monitor interface configuration command to start a port monitoring session. To stop a port monitoring session, use the no form of this command.
Syntax
port monitorsrc-interface [rx | tx]
no port copysrc-interface
src-interfaceValid ethernet port or port-channel number.
rxMonitors only received packets. If no option is specified, both rx and tx packets are received.
txMonitors only transmitted packets. If no option is specified, both Rx and Tx packets are received.
Default Configuration
This command has no default configuration.
Command Mode
Interface Configuration (Ethernet) Mode
User Guidelines
This command enables traffic on one port to be copied to another port, or between the source port (src-interface) and a destination port (the port being configured).
The port being monitored cannot be set faster than the monitoring port.
The following restrictions apply to ports configured to be destination ports:
The port cannot be already configured as a source port.
The port cannot be a member of a port-channel.
An IP interface is not configured on the port.
GVRP is not enabled on the port.
The port is not a member in any VLAN, except for the default VLAN (will automatically removed from the default VLAN).
The following restrictions apply to ports configured to be source ports:
Port monitoring source ports must be simple ports, and not port-channel ports
The port cannot be already configured as a destination port.
All the frames are transmitted already tagged from the destination port.
There is no limitation on the number of source ports, but only one destination port can be defined.
Example
The following example copies traffic on port 1/e8 (source port) to port 1/e1 (destination port).
Console(config)# interface ethernet 1/e1
Console(config-if)# port monitor 1/e8
show ports monitor
Use the show ports monitor privileged EXEC command to display the port monitoring status.
Syntax
show ports monitor
Default Configuration
This command has no default configuration.
Command Mode
Privileged EXEC Mode
User Guidelines
There are no user guidelines for this command.
Example
The following example displays the device port copy status.