31
If an interface receives a packet that it sent out, a loop has occurred. Loops may cause broadcast storms,
which degrade network performance. You can enable loopback detection to detect loops on an interface
and, if the interface supports the loopback-detection action command, configure the protective action (for
example, shut down the port) to take on the interface when a loop is detected.
In addition to the configured protective action, the switch also performs other actions to alleviate the
impact of the loop condition. For more information, see Table 11.
Table 11 Actions to take upon detection of a loop condition
No protective action is configured
A protective action is configured
Place the interface in controlled mode. The
interface does not receive or send packets.
Generate traps.
Delete all MAC address entries of the interface.
Perform the configured protective
action.
Generate traps and log messages.
Delete all MAC address entries of the
interface.
Generate traps.
If loopback detection control is enabled, set the
interface in controlled mode. The interface
does not receive or send packets.
Delete all MAC address entries of the interface.
Create traps and log messages.
If loopback detection control is
enabled, take the configured protective
action on the interface.
Delete all MAC address entries of the
interface.
Related commands: loopback-detection control enable.
Syntax
loopback-detection enable
undo loopback-detection enable
View
System view, Layer 2 Ethernet interface view, port group view
Default level
2: System level
Parameters
None
Example
# Enable loopback detection on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] loopback-detection enable
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] loopback-detection enable
loopback-detection interval-time
Description
Use the loopback-detection interval-time command to set the loopback detection interval.