Port Mirroring Configuration Commands I Table of Contents Table of Contents Chapter 1 Port Mirroring Configuration Commands..........................................................................1 1.1 Port Mirroring Configuration Commands..............................................................................1 1.1.1 mirror.............................................................................................................................. 1 1.1.2 show mirror....................................................................................................................2 II Port Mirroring Configuration Commands Chapter 1 Port Mirroring Configuration Commands 1.1 Port Mirroring Configuration Commands Port mirroring configuration commands include:  mirror  show mirror 1.1.1 mirror Syntax To set port mirror, run this command. [no] mirror session session_number {destination {interface interface-id } { rspan vid tpid} | source {interface interface-id [, | -] [rx | tx | both ] } Parameters Parameters Description session_number Number of port mirroring Value range: 1-4 destination Information about destination port mirroring vid VID of the tag of remote mirroring TPID TPID of the tag of remote mirroring source Information about the mirrored port rx | tx |both Data flow that will be mirrored Rx means that only the input data is mirrored; tx means that only the output data is mirrored; both means both the input data and the output data are mirrored. Default Value None Usage Guidelines This command is configured in global configuration mode. Note: The unknown unicast packets including the unknown unicast and the broadcast take the source whose mirroring number is 1 as the source port in output mirroring. 1 Port Mirroring Configuration Commands Example Local mirroring: The following example shows how to set interface g0/2 as the output mirroring of interface g0/1. Switch_config# mirror session 1 destination interface g0/2 Switch_config# mirror session 1 source interface g0/1 Remote mirroring: The following example shows how to set interface g0/2 as the local output mirroring of interface g0/1. The VLAN of remote mirroring is 100. TPID is 0x8100. Switch_config# mirror session 1 destination interface g0/2 rspan 100 0x8100 Switch_config# mirror session 1 source interface g0/1 1.1.2 show mirror Syntax To display the configuration information about port mirroring, run the following command. show mirror [session session_number] Parameters Parameters Description session_number Number of port mirroring Value range: 1-4 Default Value None Usage Guidelines This command can be used to display the information about port mirroring. Example The following example shows how to display the information of port mirroring on port 1. Switch_config#show mirror session 1 Session 1 --------- Destination Ports: g0/3 Source Ports: RX Only: None 2 Port Mirroring Configuration Commands TX Only: None Both: g0/2 3