Selecting all traffic on a VLAN interface for mirroring according to traffic direction
Syntax
vlan vid-# monitor all [in | out | both] [mirror 1 - 4 | name-str] [{1 - 4 | name-str} | {1 - 4 | name-str} | {1 - 4 | name-str}]
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.
vlan
vid-#
|
Identifies the VLAN on which to mirror traffic. |
monitor all [in | out | both] |
Uses the direction of traffic on the specified
|
mirror [1 - 4 |
name-str]
|
Assigns the VLAN traffic defined by the VLAN ID and traffic direction to a session number or name. 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 .
|
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.