Commands For Mirroring Configuration

12.1 Commands for Mirroring Configuration

12.1.1 monitor session source interface

Command: monitor session <session> source {interface <interface-list> | cpu [slot <slotnum> ]} {rx| tx| both}
no monitor session <session> source {interface <interface-list> | cpu [slot <slotnum> ]}
Function: Specify the source interface for the mirror. The no command disables this configuration.
Parameters:

  • <session>: session number for the mirror. Values 1 to 4 are supported.
  • <interface-list>: list of mirror source interfaces which can be separated by dashes and semicolons.
  • cpu slot <slotnum>: specifies the CPU on the specified board to be the source of the mirror for debugging datagrams received or sent by the specified CPU. Currently, the CPU mirror is only supported to be configured in session 4.
  • rx: filter the datagrams received by the interface.
  • tx: filter the datagrams sent out by the interface
  • both: allows for inbound and outbound datagrams.

Command mode: Global Mode
Default: None.
Usage guide: This command is used to configure the source interfaces for the mirror. It is not?restricted to the source interface of the mirror on the switch. The source can be one interface or?multiple interfaces. Both the inbound and outbound datagrams can be mirrored. If rx, tx or both is not specified, both is the default. When multiple interfaces are mirrored, the direction of the mirror can be different, but they should be configured separately.
Example: Configure to mirror the datagram sent out by interface 1/0/1-4 and to mirror the
datagram received by interface1/0/5.

active500EM(config)#monitor session 1 source interface ethernet 1/0/1-4 tx
active500EM(config)#monitor session 1 source interface ethernet 1/0/5 rx

 

12.1.2 monitor session source interface access-list

Command: monitor session <session> source {interface <interface-list>} access-list <num> {rx|tx|both}
no monitor session <session> source {interface <interface-list>} access-list <num>
Function: Specify the access control for the source of the mirror. The no command disables this configuration.
Parameters:

  • <session>: session number for the mirror. Currently only 1 to 4 is supported.
  • <interface-list>: list of source interfaces of the mirror which can be separated by dashes and semicolons.
  • <num>: number of the access list.
  • rx: specifies to filter the datagrams received by the interface by the interface.
  • tx: specifies to filter the datagrams sent out.
  • both: allows for inbound and outbound datagrams.

Command mode: Global Mode
Default: None.
Usage guide: This command is used to configure the source interfaces for the mirror. It is not restricted to the source interface of the mirror on the switch. The source can be one interface, or it can include multiple interfaces. For a flow mirror, only datagrams received can be mirrored. The parameters can be rx, tx, or both. The related access list should be prepared before this command is issued.?To configure the?access list, please refer to ACL configuration. The mirror can only be created after the destination interface of the corresponding session has been configured.
Example: Configure the mirror interface 1/0/6 to filter with access list 120 in session 2.

active500EM(config)#monitor session 2 source interface 1/0/6 access-list 120 rx

 

12.1.3 monitor session destination interface

Command: monitor session <session> destination interface <interface-number>
no monitor session <session> destination interface <interface-number>
Function: Specify the destination interface of the mirror. The no command disables this configuration.
Parameters:

  • <session>: session number of the mirror, which is currently limited to a range of 1 to 4.
  • <interface-number>: destination interface of the mirror.

Command mode: Global Mode
Default: None.
Usage guide: The switch supports 4 destination mirror interfaces. The interface configured as the destination of the mirror should not be configured as the member of the interface trunk. The maximum throughput of the interface is recommended to be larger than the total throughput of the interfaces to be mirrored. If the destination of a session is removed, the mirror path configured in the session will be removed at the same time. If the destination interface is reconfigured, the interface, and CPU mirror path will be recovered. The flow mirror can only be recovered after the destination of the interface is reconfigured.
Example: Configure interface 1/0/7 as the destination of the mirror.

active500EM(config)#monitor session 1 destination interface ethernet 1/0/7

 

12.1.4 show monitor

Command: show monitor
Function: Display information about the source and destination ports of the mirror sessions.
Parameters: None.
Command mode: Admin Mode
Default: None.
Usage guide: This command is used to display the source and destination ports for the configured mirror sessions. For port, CPU, and flow mirroring, the mirror mode of the source can be displayed. For MAC mirroring, MAC mirror configuration will be displayed for the supported switch cards.
Example: Display information about the source and destination ports of all the mirror sessions.

active500EM#show monitor
No monitor in session 1
--------------------------------------------------------
No monitor in session 2
--------------------------------------------------------
No monitor in session 3
--------------------------------------------------------
No monitor in session 4
--------------------------------------------------------

 


Return to Controller Wired CLI Table of Contents