1-5
After you enable loopback detection on Ethernet ports, the switch can monitor if an external loopback
occurs on them. If there is a loopback port found, the switch will deal with the loopback port according to
your configuration.
1) If a loop is found on an access port, the system will set the port to the block state (ports in this state
cannot forward data packets), send log messages to the terminal, and remove the corresponding
MAC forwarding entry.
z If you have also enabled the loopback port auto-shutdown function on the port, the system will shut
down the port, and send log messages to the terminal. After the loop is removed, you need to use
the undo shutdown command to bring up the port.
z If you have not enabled the loopback port auto-shutdown function on the port, the port will
automatically resume the normal forwarding state after the loop is removed.
2) If a loop is found on a trunk or hybrid port, the system merely sends log messages to the terminal
but does not set the port to the block state or remove the corresponding MAC forwarding entry.
You can also further control the loopback port by enabling one of the following function on it (note
that, the following two function are mutually exclusive and the latest function configured takes
effect):
z Enable the loopback port control function on the port: the system sets the port to the block state
(where the port cannot forward data packets), sends log messages to the terminal, and removes
the corresponding MAC forwarding entry. After the loop is removed, the port automatically resumes
the normal forwarding state.
z Enable the loopback port auto-shutdown function on the port: the system shuts down the port and
sends log messages to the terminal. After the loop is removed, the port does not automatically
resume the normal forwarding state. Instead, you need to use the undo shutdown command to
bring up the port.
Follow these steps to configure loopback detection for an Ethernet port:
To do… Use the command… Remarks
Enter system view
system-view
—
Enable loopback
detection globally
loopback-detection enable
Optional
By default, the global loopback
detection function is enabled if the
device boots with the default
configuration file (config.def);
By default, this function is disabled. if
the device boots with null configuration,
Set the interval for
performing port loopback
detection
loopback-detection
interval-time time
Optional
The default is 30 seconds.
Enable
loopback
detection
on the
specified
ports in
bulk
loopback-detection
interface-list enable
Enable
loopback
detection
on the
ports
Enable
loopback
interface interface-type
interface-number
Use either command.
By default, the loopback detection
function is enabled if the device boots
with the default configuration file
(config.def);
By default, this function is disabled. if
the device boots with null configuration,