Ethernet Port Configuration 153
Enabling Loopback
Detection on an
Ethernet Port
Loop occurs when a port receives the packets that it sent out. Loops may cause
broadcast storm. The purpose of loopback detection is to detect loops on a port.
With loopback detection enabled on an Ethernet port, the device checks the port
for external loopback periodically. Once a loopback is detected on the port, the
system does the following:
■ If loops are detected on a port that is of access type, the port will be shutdown.
Meanwhile, trap messages will be sent to the terminal, and the corresponding
MAC address forwarding entries will be removed.
■ If loops are detected on a port that is of trunk or hybrid type, trap messages are
sent to the terminal. If the loopback detection control function is also enabled
on the port, the port will be blocked, trap messages will be sent to the
terminal, and the corresponding MAC address forwarding entries will be
removed.
Follow these steps to configure loopback detection:
c
CAUTION:
■ Loopback detection on a given port is enabled only after the
loopback-detection enable command has been issued in both system view
and the port view of the port.
■ Loopback detection on all ports will be disabled after the issuing of the undo
loopback-detection enable command in system view.
■ If the system detects loopback in multiple VLANs on a port in a detection
interval, it sends only one trap to the terminal rather than one trap per VLAN.
■ The aggregation port can not support loopback detection.
Configuring the Cable
Type for an Ethernet
Port
Two types of Ethernet cables can be used to connect Ethernet devices: crossover
cable and straight-through cable. To accommodate these two types of cables, an
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
the port
loopback-detection enable Required
Disabled by default
Enable loopback detection
control on the port (Trunk or
Hybrid)
loopback-detection control
enable
Optional
Disabled by default
Enable loopback detection in
all the VLANs containing the
port
loopback-detection
per-vlan enable
Optional
Enabled only in the default
VLAN(s) with Trunk port or
Hybrid ports