Commands For Port Loopback Detection Function

2.3 Commands for Port Loopback Detection

2.3.1 debug loopback-detection

Command: debug loopback-detection
Function: After enabling the loopback detection debug on a port, debug information will be generated when sending and receiving messages and changing states.
Parameters: None.
Command mode: Admin Mode
Default: Disabled.
Usage guide: Display the message sending, receiving, and state changes with this command.
Example: Display the message sending, receiving, and state changes.

active500EM#debug loopback-detection
%Jan 01 03:29:18 2006 Send loopback detection probe packet:dev Ethernet1/0/10, vlan id 1
%Jan 01 03:29:18 2006 Send loopback detection probe packet:dev Ethernet1/0/10, vlan id 2

2.3.2 loopback-detection control

Command: loopback-detection control {shutdown |block| learning}
???????????????????no loopback-detection control
Function: Enable loopback detection control on a port. The no operation of this command will disable the function.
Parameters:

  • shutdown: set the control method as shutdown, which means to close down the port if a port loopback is found.
  • block: set the control method as block, which means to block a port by allowing bpdu and loopback detection messages only if a port loopback is found.
  • learning: disable learning MAC addresses on the port, the non-forwarding of traffic, and delete the MAC address of the port.

Command mode: Port Mode
Default: Disable loopback detection control.
Usage guide: If there is any loopback, the port will not return to the controlled state after enabling control operation on the port. If overtime is configured, the ports will recover to the normal state when the overtime time-outs. If the control method is blocked, the corresponding relationship between instance and VLAN ID should be set manually.
Example: Enable loopback detection control for port1/0/2.

active500EM(config)#interface ethernet 1/0/2
active500EM(config-if-ethernet1/0/2)#loopback-detection control shutdown
active500EM(config-if-ethernet1/0/2)#no loopback-detection control

2.3.3 loopback-detection control-recovery timeout

Command: loopback-detection control-recovery timeout <0-3600>
Function: This command is used to recover to the uncontrolled state after a specified time when a loopback has been detected by the port entry in controlled state.
Parameter:

  • <0-3600>: recovery time in seconds to the controlled state. 0 is no recovery.

Command mode: Global Configuration Mode
Default: The recovery is not automatic.
Usage guide: When a port detects a loopback in control mode, the port will not recover. The port will not send packets for detection in shutdown mode. However, the port will send loopback-detection packets to detect whether there is a loopback in block or learning mode. If the recovery time is configured, the ports will recover normal state after the time-out.
Examples: Enable automatic recovery of the loopback-detection control mode after 30 seconds.

active500EM(config)#loopback-detection control-recovery timeout 30

2.3.4 loopback-detection interval-time

Command: loopback-detection interval-time <loopback> <no-loopback>
???????????????????no loopback-detection interval-time
Function: Set the loopback detection interval. The no command closes the loopback detection interval function.
Parameters:

  • <loopback >: detection interval if any loopback is found. The valid range is from 5 to 300 in seconds.
  • <no-loopback >: detection interval if no loopback is found. The valid range is from 1 to 30 in seconds.

Command mode: Global Mode
Default: 5 seconds with loopbacks existing and 3 seconds otherwise.
Usage guide: When there is no loopback detection, the detection interval can be relatively shorter.
Example: Set the loopback diction interval to 35, 15.

active500EM(config)#loopback-detection interval-time 35 15

2.3.5 loopback-detection specified-vlan

Command: loopback-detection specified-vlan <vlan-list>
???????????????????no loopback-detection specified-vlan [<vlan-list>] Function: Enable loopback detection on the port and specify the VLAN to be checked. The no operation of this command will disable the loopback detection through this port or the specified VLAN.
Parameter:

  • <vlan-list>: list of allowed VLANs passing through the port. Given the situation of a trunk port, the specified VLANs can be checked. This command is used to set the VLAN list to be checked.

Command mode: Port Mode
Default: Disable the function of detecting the loopbacks through the port.
Usage guide: If a port can be a trunk port of multiple VLANs, loopback detection can be implemented on the basis of port+VLAN. This means the objects of the detection can be the specified VLANs on a port. If the port is an access port, only one VLAN on the port is allowed to be checked despite the fact that multiple VLANs can be configured. This function is not supported under Port-channel.
Example: Enable loopback detection for port 1/0/2 mode.

active500EM(config)#interface ethernet 1/0/2
active500EM(config-if-ethernet1/0/2)#switchport mode trunk
active500EM(config-if-ethernet1/0/2)#switchport trunk allowed vlan all
active500EM(config-if-ethernet1/0/2)#loopback-detection specified-vlan 1;3;5-20
active500EM(config-if-ethernet1/0/2)#no loopback-detection specified-vlan 1;3;5-20

2.3.6 show loopback-detection

Command: show loopback-detection [interface <interface-list>] Function: Display the state of loopback detection on all ports if no parameter is provided or the state and result of the specified ports according to the parameters.
Parameter:

  • <interface-list>: list of ports to be displayed, for example: ethernet 1/0/1.

Command mode: Admin and Configuration Mode
Default: None.
Usage guide: Display the state and result of loopback detection on ports with this command.
Example: Display the state and result of loopback detection on ports with this command.

active500EM#show loopback-detection interface ethernet 1/0/2
Loopback Detection Global Information
Transmit Interval    : 5s(loopback mode), 3s(no loopback mode)
Control Recover Time : 0
Loopback Detection Port Information
PortName            Loopback Detection            Control Mode   Is Controlled  Happen times
Ethernet1/0/2       Disable                       No             No             0

Interface list = range from ethernet 1/0/1 to ethernet 1/0/28; Global view.

active500EM#show loopback-detection
Loopback Detection Global Information
Transmit Interval    : 5s(loopback mode), 3s(no loopback mode)
Control Recover Time : 0
Loopback Detection Port Information
PortName            Loopback Detection            Control Mode   Is Controlled  Happen times
Ethernet1/0/1       Disable                       No             No             0
Ethernet1/0/2       Disable                       No             No             0
Ethernet1/0/3       Disable                       No             No             0
Ethernet1/0/4       Disable                       No             No             0
Ethernet1/0/5       Disable                       No             No             0
Ethernet1/0/6       Disable                       No             No             0
Ethernet1/0/7       Disable                       No             No             0
Ethernet1/0/8       Disable                       No             No             0
Ethernet1/0/9       Disable                       No             No             0
Ethernet1/0/10      Disable                       No             No             0
Ethernet1/0/11      Disable                       No             No             0
Ethernet1/0/12      Disable                       No             No             0
Ethernet1/0/13      Disable                       No             No             0
Ethernet1/0/14      Disable                       No             No             0
Ethernet1/0/15      Disable                       No             No             0
Ethernet1/0/16      Disable                       No             No             0
Ethernet1/0/17      Disable                       No             No             0
Ethernet1/0/18      Disable                       No             No             0
Ethernet1/0/19      Disable                       No             No             0
Ethernet1/0/20      Disable                       No             No             0
Ethernet1/0/21      Disable                       No             No             0
Ethernet1/0/22      Disable                       No             No             0
Ethernet1/0/23      Disable                       No             No             0
Ethernet1/0/24      Disable                       No             No             0
Ethernet1/0/25      Disable                       No             No             0
Ethernet1/0/26      Disable                       No             No             0
Ethernet1/0/27      Disable                       No             No             0
Ethernet1/0/28      Disable                       No             No             0

??

Return to Controller Wired CLI Table of Contents