Loopback Detection Configuration Commands I Table of Contents Table of Contents Chapter 1 Loopback Detection Configuration Commands....................................................................... 1 1.1 loopback-detection....................................................................................................................1 1.2 loopback-detection enable.......................................................................................................2 1.3 loopback-detection vlan-control..............................................................................................2 1.4 loopback-detection hello-time................................................................................................. 3 1.5 loopback-detection recovery-time.......................................................................................... 4 1.6 loopback-detection control.......................................................................................................4 1.7 loopback-detection dest-mac.................................................................................................. 5 1.8 loopback-detection existence..................................................................................................6 1.9 loopback-detection frames-threshold.....................................................................................7 1.10 loopback-detection frames-monitor..................................................................................... 7 1.11 show loopback-detection....................................................................................................... 8 1.12 show loopback-detection....................................................................................................... 9 II Loopback Detection Configuration Commands Chapter 1 Loopback Detection Configuration Commands Loopback Detection Configuration Commands include:  loopback-detection  loopback-detection enable  loopback-detection vlan-control  loopback-detection hello-time  loopback-detection recovery-time  loopback-detection control  loopback-detection dest-mac  loopback-detection existence  loopback-detection frames-threshold  loopback-detection frames-monitor  show loopback-detection  show loopback-detection interface 1.1 loopback-detection Syntax To enable global loopback detection, run the following command. To return to the default setting, use the no form of this command. [no] loopback-detection Parameters None Default Value Loopback detection is globally disabled by default. 1 Loopback Detection Configuration Commands Command Mode Global configuration mode Usage Guidelines None Example Switch#config Switch_config# Switch_config#loopback-detection 1.2 loopback-detection enable Syntax To enable or disable loopback detection on a port, run the following command. [no] loopback-detection enable Parameters None Default Value Loopback detection is disabled on a port by default. Command Mode Port configuration mode Usage Guidelines This command can be used to enable or disable loopback detection on a specified port. However, this settings takes effect only after loopback detection is enabled globally. Example Switch_config# Switch_config#interface g0/1 Switch_config_g0/1#loopback-detection enable 1.3 loopback-detection vlan-control Syntax To set a port to perform loopback detection toward a specified VLAN, run the following command. 2 Loopback Detection Configuration Commands [no] loopback-detection vlan-control vlan-list Parameters Parameters Description vlan-list Stands for a VLAN specified by a port. It ranges from 1 to 4094, and up to 10 VLANs can be specified. Default Value None Command Mode Port configuration mode Usage Guidelines After loopback detection is configured on a specified VLAN, the port transmits multiple detection packets of specified VLAN tag regularly and the number of these detection packets transmitted by this port can be up to 10. Example Switch_config#interface g0/1 Switch_config_g0/1#loopback-detection vlan-control 1-5 1.4 loopback-detection hello-time Syntax To set the transmission period of loopback detection packets, run the following command. [no] loopback-detection hello-time hello-time Parameters Parameters Description hello-time Stands for the transmission period of loopback packets, whose unit is second. Default Value 3 seconds Command Mode Port configuration mode 3 Loopback Detection Configuration Commands Usage Guidelines None Example None 1.5 loopback-detection recovery-time Syntax To set the recovery time of a port after being controlled, run the following command. [no] loopback-detection recovery-time recovery-time Parameters Parameters Description recovery-time Stands for the recovery time of a port after being controlled, whose unit is second. Default Value 10 seconds Command Mode Port configuration mode Usage Guidelines None Example None 1.6 loopback-detection control Syntax To set a port to be controlled, run the following command. [no] loopback-detection control { block|learning|shutdown} Parameters Parameters Description block Sets a port to be blocked. learning Sets a port to be learning. shutdown Sets a port to be shutdown. 4 Loopback Detection Configuration Commands Default Value None Command Mode Port configuration mode Usage Guidelines When a port detects loopback exists in its network, you can perform corresponding control actions to this port by setting control functions. The controlled states of a port include block, nolearn, shutdown and trap. When a controlled state is configured and loopback exists on a port, the trap message be transmitted. It is not configured by default. After loopback detection is enabled globally, the port on which loopback detection is enabled transmits the loopback detection packets and receives the already transmitted loopback detection packets. Four control actions are conducted on the port: block : This means to block the port. When loopback is found, this port will be isolated from other ports and the packets going into this port cannot be forwarded to other ports. This port is then in protocol down state and its MAC address table ages. nolearn: This means forbidding this port to learn MAC addresses. Upon the discovery of loopback on a port, this port will not learn MAC addresses and at the same time age its MAC address table. Shutdown: Disable the port. When detecting the loopback, the port forwards trap warning information, ages the MAC address table and automatically disables the port (error-disable). Thus, the port cannot forward the packet until the error-disable-recover time. trap: It means that the port only reports alarms. When loopback is discovered, the port will only report alarms and age its MAC address table. When a port is blocked, the packets entering into this port cannot be forwarded by this port and this port will go on transmitting loopback detection packets at the same time; when loopback disappears, the port will recover itself automatically. Loopback disappearance takes place if the port has not received loopback detection packets within 10 seconds. In block state the port protocol is down, while in shutdown state the port's link is down directly. Example Switch#config Switch_config#interface g0/1 Switch_config_g0/1#loopback-detection control block 1.7 loopback-detection dest-mac Syntax To set the destination MAC address of loopback detection packets on a port, run the following 5 Loopback Detection Configuration Commands command. [no] loopback-detection dest-mac mac-addr Parameters Parameters Description mac-addr Stands for the MAC address that corresponds to a MAC VLAN entry. Default Value The default destination MAC address is 01-80-C2-00-00-0a. Command Mode Port configuration mode Usage Guidelines None Example Switch_config#interface g0/1 Switch_config_g0/1#loopback-detection dest-mac 1111.1111.1111 1.8 loopback-detection existence Syntax To set a standard to judge whether loopback exists on a port when this port is enabled or its link state is UP, run the following command. [no] loopback-detection existence Parameters None Default Value Loopback is nonexistent by default. Command Mode Port configuration mode Usage Guidelines This command is mainly used to solve the problem that loopback exists on a port or not when this port is up and its loopback detection function takes effect. When the controlled 6 Loopback Detection Configuration Commands action of this port is set to shutdown, it is improper to regard that loopback exists on this port for a shutdown port has already not forwarded packets. There is no loopback by default. Example None 1.9 loopback-detection frames-threshold Syntax To configure the upper threshold the loop detection frame received every minute, run the following command. [no] loopback-detection frames-threshold frames-threshold Parameters Parameters Description frames-threshold The upper threshold the loop detection frame received every minute (100-200) Default Value The default upper threshold is 10. Command Mode Port configuration mode Usage Guidelines None Example Switch_config#interface g0/1 Switch_config_g0/1#loopback-detection frames-threshold 20 1.10 loopback-detection frames-monitor Syntax To configure enable or disable frame number detection function, run the following commands. [no] loopback-detection frames-monitor 7 Loopback Detection Configuration Commands Parameters None Default Value Disabled. Command Mode Port configuration mode Usage Guidelines None Example Switch#config Switch_config#interface g0/1 Switch_config_g0/1#loopback-detection frames-monitor 1.11 show loopback-detection Syntax To display the configuration details of loopback detection, run the following command. show loopback-detection Parameters None Default Value None Command Mode EXEC mode, Global configuration mode or interface mode Usage Guidelines This command is used to display the global or port’s loopback detection configurations and port status. Example Switch#show loopback-detection Loopback-detection is enable 8 Loopback Detection Configuration Commands Interface state information Port Status dest MacAddress Control VLAN ------------ --------- ------------------------ ----------- ------------------------------- G0/1 UP 1234.5678.9abc BLOCK 1-5 G0/2 UP 0180.c200.000a WARNING G0/3 UP 0180.c200.000a BLOCK G0/4 UP 0180.c200.000a WARNING G0/5 UP 0180.c200.000a WARNING G0/6 UP 0180.c200.000a WARNING 1-8 G0/7 UP 0180.c200.000a WARNING G0/8 UP 0180.c200.000a WARNING G0/9 UP 0180.c200.000a WARNING G0/10 UP 0180.c200.000a WARNING G0/11 UP 0180.c200.000a WARNING G0/12 UP 0180.c200.000a WARNING G0/13 UP 0180.c200.000a WARNING G0/14 UP 0180.c200.000a WARNING G0/15 UP 0180.c200.000a WARNING G0/16 UP 0180.c200.000a WARNING 1.12 show loopback-detection Syntax To display the information about the loopback detection port, run the following command. show loopback-detection intf-id Parameters Parameters Description Interface Intf-id Displays the designated port. Default Value None Command Mode EXEC mode, Global configuration mode or interface mode Usage Guidelines This command is mainly used to display the status of the loopback detection port. 9 Loopback Detection Configuration Commands Example Switch#show loopback-detection interface g0/1 Receive Packets :0 Transmit Packets: 20 Discard Packets:0 HelloTimeOut:10 RecoverTimeOut:26 10