monitor

Configures monitoring of the mirrored ports.
Syntax
monitor [ ethernet stackid/slot/port ] { both | input | output }
no monitor [ ethernet stackid/slot/port ] { both | input | output }
Command Default

Ports are not monitored.

Parameters
ethernet stackid/slot/port
Specifies the mirror port to be used.
both
Monitors both incoming and outgoing traffic on the mirrored port.
input
Monitors the ingress traffic on the mirrored port.
output
Monitors the egress traffic on the mirrored port.
Modes

Interface configuration mode

VLAN configuration mode

Usage Guidelines

If you configure both ACL mirroring and ACL-based rate limiting on the same port, then all packets that match are mirrored, including the packets that exceed the rate limit. The same port cannot be both a monitored port and the mirror port. The same port can be monitored by one mirror port for ingress traffic and another mirror port for egress traffic. The mirror port cannot be a LAG port. More than one monitored port can be assigned to the same mirror port.

For stacked devices, if the ingress and egress analyzer ports are always network ports on the local device, each device may configure the ingress and egress analyzer port independently. However, if you need to mirror to a remote port, then only one ingress and one egress analyzer port are supported for the entire system.

The no form of the command stops monitoring the mirrored ports.

Examples

The following example shows how to monitor the mirrored ports.

device(config)# interface ethernet 1/2/11
device(config-if-e1000-1/2/11)# monitor ethernet 1/2/4 both

The following example shows how to configure VLAN-based mirroring.

device(config)# mirror-port ethernet 1/1/21 input
device(config)# vlan 10
device(config-vlan-10)# monitor ethernet 1/1/21
device(config-vlan-10)# exit
device(config)# vlan 20
device(config-vlan-20)# monitor ethernet 1/1/21
device(config-vlan-20)# end