![H3C S5120-SI Series Operation Manual Download Page 69](http://html2.mh-extra.com/html/h3c/s5120-si-series/s5120-si-series_operation-manual_3711174069.webp)
1-7
Enabling Loopback Detection on an Ethernet port
If an interface receives a packet that it sent out, a loop occurs. Loops may cause broadcast storms. The
purpose of loopback detection is to detect loops on an interface. When loopback detection is enabled
on an Ethernet port, the device periodically checks for loops on the interface. If a loop is detected on the
interface, 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.
Follow these steps to configure loopback detection:
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enable global loopback
detection
loopback-detection enable
Required
Disabled by default
Configure the interval for port
loopback detection
loopback-detection
interval-time time
Optional
30 seconds by default
Enter Ethernet port view
interface interface-type
interface-number
—
Enable loopback detection on a
port
loopback-detection enable
Required
Disabled by default
Enable loopback detection
control on a trunk port or a
hybrid port
loopback-detection control
enable
Optional
Disabled by default
Enable loopback detection in all
the VLANs to which trunk or
hybrid ports belong
loopback-detection per-vlan
enable
Optional
Enabled only in the default
VLAN(s) with trunk port or
hybrid ports
z
Loopback detection on a given port is enabled only after the
loopback-detection enable
command has been configured in both system view and the interface view of the port.
z
Loopback detection on all ports will be disabled after you configure the
undo loopback-detection
enable
command in system view.
Configuring the MDI Mode for an Ethernet port
The optical interfaces of SFP ports do not support this function.