xStack
® 
DGS-3120 Series Managed Switch CLI Reference Guide 
465 
 
Chapter 46  Mirror Command List 
 
config mirror port <port> {[add | delete] source ports <portlist> [rx | tx | both]} 
 
46-1  config mirror 
Description 
This command is used to configure a mirror port − source port pair on the Switch. Traffic from any 
source port to a target port can be mirrored for real-time analysis. A logic analyzer or an RMON 
probe then can be attached to study the traffic crossing the source port in a completely unobtrusive 
manner. When mirroring port traffic, please note that the target port must be configured in the 
same VLAN and operates at the same speed as the source port.  If the target port is operating at a 
lower speed, the source port will be forced to drop its operating speed to match that of the target 
port. 
 
Format 
config mirror port <port> {[add | delete] source ports <portlist> [rx | tx | both]} 
 
Parameters 
port - The port that will receive the packets duplicated at the mirror port. 
<port>
 - Enter the port number to be configured here. 
add - (Optional) The mirror entry to be added. 
delete - (Optional) The mirror entry to be deleted. 
source ports - (Optional) The port that will be mirrored.  All packets entering and leaving the 
source port can be duplicated in the mirror port. 
<portlist> - Enter the list of port to be configured here. 
rx - (Optional) Allows the mirroring packets received (flowing into) the port or ports in the port list. 
tx - (Optional) Allows the mirroring packets sent (flowing out of) the port or ports in the port list. 
both - (Optional) Mirrors all the packets received or sent by the port or ports in the port list. 
 
Restrictions 
Only Administrator and Operator-level users can issue this command. 
 
Example 
To add the mirroring ports: 
DGS-3120-24TC:admin#config mirror port 1:3 add source ports 1:7-1:12 both 
Command: config mirror port 1:3 add source ports 1:7-1:12 both 
 
Success.