源接口

Syntax

源接口{|} [] no source interface {|} []

Description

Configures the specified interface (either an Ethernet port or a LAG) as a source of traffic to be mirrored.

Thenoform of this command ceases mirroring traffic from the specified source interface and removes the source interface from the mirroring session configuration.

Command context

config-mirror-

Parameters

Specifies a physical port on the switch. Use the formatmember/slot/port(for example,1/3/1).

Specifies the identifier for the LAG (link aggregation group).

Selects the direction of traffic to be mirrored from this source interface. There is no default for this parameter. Valid values are the following:

both

米尔ror both transmitted and received packets.

rx

米尔ror only received packets.

tx

米尔ror only transmitted packets.

Authority

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

Usage

There is a limit of four source interfaces in each direction of a given mirror session. However, there is a practical limit to the amount of traffic that a mirror destination can transmit. For example, mirroring session with multiple 10G sources can overwhelm a single 10G destination.

NOTE:

When adding, removing, or changing the configuration of a source port in an enabled mirroring session, packets from other mirror sources using the same destination port might be interrupted.

Examples

Configuring a mirrored traffic source interface:

switch(config-mirror-1)#源接口LAG-NAME Enter a LAG name. For example, lag10 PORT-NUM Enter a port number

Creating a mirroring session and configuring a source interface to mirror both transmitted and received packets:

switch(config)#mirror session 1switch(config-mirror-1)#源接口1/1/1 both

Creating a second mirroring session and configuring two source interfaces. One port mirroring only transmitted packets and the other mirroring both transmitted and received packets:

switch(config)#mirror session 2switch(config-mirror-2)#源接口1/1/3 txswitch(config-mirror-2)#源接口1/2/1 both

Removing the first source interface:

switch(config-mirror-2)#no source interface 1/2/3

Configuring a source interface to mirror received packets only:

switch(config-mirror-3)#源接口1/1/2 rx

Configuring a source interface to mirror both transmitted and received packets:

switch(config-mirror-1)#源接口1/1/1 both

Configuring a LAG as source interface to mirror both transmitted and received packets:

switch(config-mirror-4)#源接口lag1两

Stopping the mirroring of received packets from a configured source interface:

switch(config-mirror-4)#no source interface lag1 rx