Configuration Guide     104
Managing Physical Interfaces Loopback Detection Configuration
4.2  Using the CLI
Follow these steps to configure loopback detection:
Step 1 configure
Enter global configuration mode.
Step 2 loopback-detection
Enable the loopback detection feature globally. By default, it is disabled.
Step 3 loopback-detection interval 
interval-time
Set the interval of sending loopback detection packets which is used to detect the loops in 
the network.
interval-time: 
The interval of sending loopback detection packets. The valid values are from 
1 to 1000 seconds. By default, the value is 30 seconds.
Step 4 loopback-detection recovery-time
 recovery-time
Set the auto-recovery time, after which the blocked port in Auto Recovery mode can 
automatically be recovered to normal status.
recovery-time
: Specify the detection interval, ranging from 2 to 100,000 seconds. The 
default value is 90.
Step 5 interface { fastEthernet 
port
 | range fastEthernet 
port-list
 | gigabitEthernet 
port
 | range 
gigabitEthernet 
port-list 
| ten-gigabitEthernet 
port
 | ten-range gigabitEthernet 
port-list 
| 
port-channel 
port-channel
 | range port-channel 
port-channel-list
 |}
Enter interface configuration mode. 
Step 6 loopback-detection
Enable loopback detection for the port. By default, it is disabled.
Step 7 loopback-detection config process-mode { alert | port-based | vlan-based } recovery-
mode { auto | manual } 
Set the process mode when a loopback is detected on the port. There are three modes:
alert: The switch will only display alerts when a loopback is detected. It is the default setting.
port-based: In addition to displaying alerts, the switch will block the port on which the loop 
is detected.
vlan-based: In addition to displaying alerts, the switch will block the VLAN of the port in 
which the loop is detected.
Set the recovery mode for the blocked port. There are two modes:
auto: After the recovery time expires, the blocked port will automatically recover to normal 
status and restart to detect loops in the network.
manual: The blocked port can only be released manually. You can use the command 
‘loopback-detection recover’ to recover the blocked port to normal status.
Step 9 show loopback-detection global
Verify the global configuration of Loopback Detection.