Configuring VLAN-based Mirroring

The following example enables mirroring on VLANs 10 and 20, to mirror port e 1/1/21.

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

The following example disables mirroring on VLAN 20.

device(config)# vlan 20
device(config-VLAN-20)# no monitor ethernet 1/1/21
device(config-VLAN-20)# end