Management and Configuration Guide K/KA/KB.15.15

This command assigns a monitored VLAN source to a previously configured mirroring
session on a source switch by specifying the VLAN ID, the direction of traffic to
mirror, and the session.
Identifies the VLAN on which to mirror traffic.vlan vid-#
Uses the direction of traffic on the specified vid-# to select traffic to
mirror.If you enter the monitor all command without selection criteria
or a session identifier, the command applies by default to session 1.
monitor all [ in |
out | both ]
Assigns the VLAN traffic defined by the VLAN ID and traffic direction
to a session number or name.
mirror [ 1 - 4 |
name-str ]
Depending on how many sessions are already configured on the switch,
you can use the same command to assign the specified VLAN source
to up to four sessions, for example, interface a1 monitor all
in mirror 1 2 4.
1 - 4 : Configures the selected VLAN traffic to be mirrored in the
specified session number.
[name name-str ]: Optional; configures the selected port traffic
to be mirrored in the specified session name. The string can be used
interchangeably with the session number when using this command
to assign a mirroring source to a session. To configure an
alphanumeric name for a mirroring session, see the command
description under “Configuring a source switch in a remote mirroring
session” (page 325).
Assigning a VLAN to a mirroring session precludes assigning any other mirroring
sources to the same session. If a VLAN is already assigned to a given mirroring
session, using this command to assign another VLAN to the same mirroring session
results in the second assignment replacing the first. Also, if there are other (port,
trunk, or mesh) mirroring sources already assigned to a session, the switch displays
a message similar to:
Mirror source port exists on session N. Can not add mirror
source VLAN.
The no form of the command removes a mirroring source assigned to the session,
but does not remove the session itself. This allows you to repurpose a session by
removing an unwanted mirroring source and adding another in its place.
Configuring a MAC address to filter mirrored traffic on an interface
Enter the monitor mac mirror command at the global configuration level.
Syntax
[ no ] monitor mac mac-addr [ src | dest | both ] mirror 1
- 4 | name-str [ 1 - 4 | name-str ] [ 1 - 4 | name-str ]
[ 1 - 4 | name-str ]
Use this command to configure a source and/or destination MAC address as criteria
for selecting traffic in one or more mirroring sessions on the switch. The MAC
address you enter is configured to mirror inbound (src), outbound (dest), or both
inbound and outbound (both) traffic on any port or learned VLAN on the switch.
monitor mac mac-addr
328 Monitoring and Analyzing Switch Operation