20
View
System view, Ethernet interface view, port group view
Default level
2: System level
Parameters
None
Description
Use the
loopback-detection enable
command to enable loopback detection globally in system view or on
ports in Ethernet interface or port group view. To use loopback detection on an Ethernet port, you must
enable the function both globally and on the port.
Use the
undo loopback-detection enable
command to disable loopback detection globally or on ports.
The
undo loopback-detection enable
command in system view disables loopback detection on all ports.
By default, loopback detection is disabled on all Ethernet interfaces.
•
When a loop is detected on an access port, the device puts the port in control mode. In this mode,
inbound packets on the port are all discarded, while outbound packets on the port are forwarded
normally. Meanwhile, the device sends trap messages to the terminal, and deletes the
corresponding MAC address forwarding entry.
•
When a loop is detected on a trunk port or a hybrid port, the device sends a trap message to the
terminal. If loopback detection control is enabled on the port, the device places the port in control
mode and discards all inbound packets on the port while normally forwarding outbound packets
on it. Meanwhile, the device sends trap messages to the terminal, and deletes the corresponding
MAC address forwarding entry.
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
loopback-detection interval-time
Syntax
loopback-detection interval-time
time
undo loopback-detection interval-time
View
System view
Default level
2: System level
Parameters
time
: Sets the loopback detection interval in seconds, in the range 5 to 300.