source interface


source interface {<PORT-NUM> | <LAG-NAME>} [<DIRECTION>]

no source interface {<PORT-NUM> | <LAG-NAME>} [<DIRECTION>]


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

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

Command context




Specifies a physical port on the switch. Use the format member/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:


Mirror both transmitted and received packets.


Mirror only received packets.


Mirror only transmitted packets.


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


There is no configuration limit on the number of source interfaces in a given mirroring 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.

You can configure the same source interface in multiple mirroring sessions, but only one of those mirroring sessions can be enabled at a time.

Classifier policies with mirror actions can also be used to match and mirror network traffic. Although mirror actions of classifier policies must specify an enabled mirroring session, the traffic matching and mirroring actions are separate from and take priority over basic mirroring sessions. For example, mirroring session 1 might monitor a source interface, but a classifier policy might match some traffic from that same source interface and direct it to the destination interface of a different mirroring session. In this situation, only the traffic that is not matched by the policy is considered for matching by mirroring session 1.

If an interface is in active use by the sFlow feature, then that interface cannot be used as source of received traffic (configured as a source destination with a direction of rx or both) in an enabled mirroring session. If you want to use this interface as a source of received traffic in a mirroring session, you must disable sFlow on the interface before you enable the mirroring session on the same interface.


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.


Configuring a mirrored traffic source interface:

switch(config-mirror-1)# source interface
  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 1
switch(config-mirror-1)# source interface 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 2
switch(config-mirror-2)# source interface 1/1/3 tx
switch(config-mirror-2)# source interface 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)# source interface 1/1/2 rx

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

switch(config-mirror-1)# source interface 1/1/1 both

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

switch(config-mirror-4)# source interface lag1 both

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

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