source vlan

Syntax

source vlan{rx | tx | both} no source vlan[rx | tx | both]

Description

Adds or removes VLAN as a source of traffic to be mirrored. More than one source VLAN can be configured in a mirror session. Each VLAN may specify its own direction.

The没有version of the command ceases mirroring traffic from the specified source VLAN and removes the source from the mirror configuration.

There is a limit of 1024 source VLANs in each direction of a given mirror session. The same VLAN can be configured as a mirror source for multiple sessions.

Command context

config

Parameters

Configured VLAN number.

rx

Mirror only received traffic.

tx

Mirror only transmitted traffic.

both

Mirror both received and transmitted traffic.

Authority

Administrators or local user group members with execution rights for this command.

Example

Create a mirror session and add VLAN 10 as a source of traffic in both directions on that port.

switch(config)#mirror session 1switch(config-mirror-1)#source vlan 10 both

Create a second mirror session and add VLAN 10 as a transmit sources of traffic and VLAN 20 in both receive and transmit directions.

switch(config)#mirror session 2switch(config-mirror-2)#源vlan tx 10switch(config-mirror-2)#source vlan 20 both

Reconfigure the source in session 2 to be receive only by respecifying the source interface configuration.

switch(config-mirror-2)#source vlan 10 rx

From the second session, remove the first source interface entirely and remove the transmit direction from the other so that mirroring only occurs in the receive direction.

switch(config-mirror-2)#没有source vlan 10switch(config-mirror-2)#没有source vlan 20 tx

Message received when trying to add more than 1024 mirror source VLANs

switch(config-mirror-2)#source vlan 2000 rx的最大数量VLANs per mirror session is 1024 in each direction