The loopback-detect action command configures an action to be taken when a loopback is detected on an interface.
The undo loopback-detect action command restores the default action.
By default, an interface is shut down when a loopback is detected on the interface.
loopback-detect action { block | nolearn | shutdown | trap | quitvlan }
undo loopback-detect action [ block | nolearn | shutdown | trap | quitvlan ] (Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, MultiGE interface view, 25GE interface view, 100GE interface view, Eth-Trunk interface view)
undo loopback-detect action (port group view)
Parameter |
Description |
Value |
---|---|---|
block |
Blocks an interface when a loopback is detected. |
- |
nolearn |
Disables MAC address learning on an interface when a loopback is detected on the interface. |
- |
shutdown |
Shuts down an interface when a loopback is detected on the interface. |
- |
trap |
Only sends a trap message when a loopback is detected. |
- |
quitvlan |
The interface exits from the VLAN in which a loop occurs When a loopback is detected on an interface. |
- |
Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, 100GE interface view, 40GE interface view, MultiGE interface view, port group view, Eth-Trunk interface view
Usage Scenario
After loopback detection is enabled on an interface, the interface sends loopback detection packets at intervals. When a loopback is detected on the interface, the system performs an action to minimize the impact on the entire network. The loopback-detect action command configures the action.
Prerequisites
Enable loopback detection in the interface view or system view.
Follow-up Procedure
If the action is set to block, nolearn, trap or quitvlan, you can run the loopback-detect recovery-time command to set the interface recovery time.
If the action is set to shutdown, the shutdown interface cannot be automatically restored after a loopback is eliminated. You must run the shutdown and undo shutdown commands or run the restart command to enable the interface again. In addition to the preceding methods, the interface that is manually shut down or enters the Error-Down state due to other protocols will be automatically restored after the recovery time. However, the interface that is disabled only by LBDT cannot be restored after the recovery time.