
18
loopback-detection enable
Syntax
loopback-detection enable
undo loopback-detection enable
View
System view, Layer 2 Ethernet interface view
Default level
2: System level
Parameters
None
Description
Use
loopback-detection enable
to enable loopback detection globally in system view or on interfaces in
Ethernet interface view. To use loopback detection on an Ethernet interface, you must enable the function
both globally and on the port.
Use
undo loopback-detection enable
to disable loopback detection globally or on Ethernet interfaces.
The
undo loopback-detection enable
command in system view disables loopback detection on all
interfaces.
By default, loopback detection is disabled on all Ethernet interfaces.
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.
The device performs actions to alleviate the impact of the loop condition, as shown in
.
Table 6
Actions to take upon detection of a loop condition
Port type Actions
Access port
•
Place the interface in controlled mode. The interface discards all incoming packets, but
still forwards outgoing traffic.
•
Generate traps.
•
Delete all MAC address entries of the interface.
Hybrid or trunk
port
•
Generate traps.
•
If loopback detection control is enabled, set the interface in controlled mode. The
interface discards all incoming packets, but still forwards outgoing packets.
•
Delete all MAC address entries of the interface.
Related commands:
loopback-detection control enable
.
Examples
# 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