CLI Reference Guide-R05

Table Of Contents
Chapter 13
| Port Mirroring Commands
Local Port Mirroring Commands
– 419 –
When mirroring VLAN traffic or packets based on a source MAC address, the
target port cannot be set to the same target port as that used for basic port
mirroring.
You can create multiple mirror sessions, but all sessions must share the same
destination port.
The destination port cannot be a trunk or trunk member port.
ACL-based mirroring is only used for ingress traffic. To mirror an ACL, follow
these steps:
1. Use the access-list command to add an ACL.
2. Use the access-group command to add a mirrored port to access control
list.
3. Use the port monitor access-list command to specify the destination port
to which traffic matching the ACL will be mirrored.
Example
The following example configures the switch to mirror all packets from port 6 to 5:
Console(config)#interface ethernet 1/5
Console(config-if)#port monitor ethernet 1/6 both
Console(config-if)#
This example configures port 2 to monitor packets matching the MAC address 00-
12-CF-XX-XX-XX received by port 1:
Console(config)#access-list mac m1
Console(config-mac-acl)#permit 00-12-cf-00-00-00 ff-ff-ff-00-00-00 any
Console(config-mac-acl)#exit
Console(config)#interface ethernet 1/1
Console(config-if)#mac access-group m1 in
Console(config-if)#interface ethernet 1/2
Console(config-if)#port monitor access-list m1
Console(config-if)#
show port monitor This command displays mirror information.
Syntax
show port monitor [interface | vlan vlan-id | mac-address mac-address]
interface - ethernet unit/port (source port)
unit - Unit identifier. (Range: 1)
port - Port number. (Range: 1-12)
vlan-id - VLAN ID (Range: 1-4094)