mirror session source interface

This topic explains how to start a port mirroring session from a source interface and how to stop mirroring sessions.

Syntax

CODE
mirror session <1-4> source interface id {both | rx | tx}
no mirror session {all | <1-4> | [<1-4> source interface id {both | rx | tx}]}

Parameter

<1-4>: Specify the mirror session, which can be a number from 1 to 4. The switch can support a total of four simultaneous mirroring sessions.

id: Specify the source interface, which can be a physical port or LAG, from which traffic is mirrored. The id parameter represents the interface number, allows a partial port name, and is not case-sensitive.

both: Mirroring applies to both incoming and outgoing traffic.

rx: Mirroring applies to incoming traffic only.

tx: Mirroring applies to outgoing traffic only.

all: For the no form of the command, specify all mirroring sessions. The switch can support up to four simultaneous mirroring sessions.

Default

No monitor sessions are configured for any source interfaces.

Mode

Global Configuration

Usage

Use the mirror session source interface command to start a port mirroring session from a specific source interface.

Note: Before you start a port mirroring session, first configure the destination port for the session.

Use the no mirror session command to stop either all mirroring sessions on the switch, a single mirroring session on the switch, or one specific mirroring session on a specific source port. If you stop it on a specific source port, you must stop it for either a specific direction or both directions.

Example: This example shows how to create a local SPAN session 1 to monitor both sent and received traffic on source port 1/0/1:
CODE
Switch(config)# mirror session 1 source interface 1/0/2-1/0/5 
both
Switch(config)# mirror session 1 destination interface 1/0/1