Managing Physical Interfaces Configuration Examples
Configuration Guide  
  111
5.2.4  Using the CLI
1)  Enable loopback detection globally and configure the detection interval and recovery 
time.
Switch#configure
Switch(config)#loopback-detection
Switch(config)#loopback-detection interval 30
Switch(config)#loopback-detection recovery-time 3
2)  Enable loopback detection on ports 1/0/1-3 and set the process mode and recovery 
mode.
Switch(config)#interface range gigabitEthernet 1/0/1-3
Switch(config-if-range)#loopback-detection
Switch(config-if-range)#loopback-detection config process-mode port-based 
recovery-mode auto
Switch(config-if-range)#end
Switch#copy running-config startup-config
Verify the Configuration
Verify the global configuration:
Switch#show loopback-detection global
Loopback detection global status : enable
Loopback detection interval: 30 s
Loopback detection recovery time : 90 s
Verify the loopback detection configuration on ports:
Switch#show loopback-detection interface
Port          Enable      Process Mode      Recovery Mode      Loopback     Block     LAG
----            --------      -----------------      ------------                 ------------    -- ----     -----
Gi1/0/1    enable      port-based              auto                              N/A                N/A        N/A
Gi1/0/2    enable      port-based              auto                              N/A                N/A        N/A
Gi1/0/3    enable      port-based              auto                              N/A                N/A        N/A