ECS2020 Series CLI Reference Guide R04
18
3 Port mirroring commands
3.1
Configure-relevant commands
monitor session
Create a SPAN session and specify the destination port (monitor port) and source port (monitored port). Use
the no option of the command to delete the session or remove the source port or destination port separately.
monitor session session_number { [ source interface Gigabit Ethernet port-id
[both | rx | tx ]] | [ destination interface GigabitEthernet port-id ]}
no monitor session session_number { [ source interface Gigabit Ethernet port-id
[both | rx | tx ]] | [destination interface GigabitEthernet port-id ]}
Null
Global configuration mode
Switch port and AGG (separate port settings) can be configured as source and
destination
ports. The SPAN session does not affect the normal operation of the switch.
SPAN
sessions can be configured on a disabled port, however, SPAN does not work
immediately until the destination and source port are enabled. A port cannot be both a
source port and a destination port. Use the show monitor command to display the
operating status of the SPAN session.
The following example shows how to create a SPAN session: Session 1. If the session
has already been set up,First clear the configuration of the current session 1, and then
set the port 0 interface to the port
interface 0/1.
ECS2020-10P(config)# no monitor session 1
ECS2020-10P(config)# monitor session 1 source interfaces
GigabitEthernet 0/2 both
ECS2020-10P(config)# monitor session 1 destination interface
GigabitEthernet 0/1
Parameter
Description
session_number
SPAN session number
source interface
Gigabit Ethernet port-id
Specifies the source port. For the interface-id,
specify the corresponding interface number, only
the physical
port, not the SVI.
destination interface
GIgabit Ethernet
port-id
Specifies the destination port. For interface-id,
specify the corresponding interface number, only the
physical port, not the SVI.
both
Monitors input and output traffic.
rx
Only monitors the input traffic.
tx
Only monitors the output traffic.
Command
Command
Description
monitor session
Creates a SPAN session and specifies
the destination port (monitoring port)
and source port (monitored port)
Default
Mode
Us
a
ge
Example