12when a loop is detected, for example, to shut down the interface. Depending on whether a protectiveaction is configured, the switch takes the actions in Table 1 to alleviate the impact of the loop condition.Table 1 Actions to take upon detection of a loop conditionPort type ActionsNo protective action is configured A protective action is configuredAccess port• Place the receiving interface in controlled mode.The interface drops the incoming packets andcorrectly sends packets.• Generate traps and log messages.• Delete all MAC address entries of the interface.• Perform the configured protectiveaction.• Generate traps and log messages.• Delete all MAC address entries of theinterface.Hybrid ortrunk port• Generate traps and log messages.• If loopback detection control is enabled, placethe receiving interface in controlled mode. Theinterface does not receive or send packets.• Delete all MAC address entries of the interface.• Generate traps and log messages.• If loopback detection control isenabled, take the configuredprotective action on the interface.• Delete all MAC address entries of theinterface.Configuration restrictions and guidelines• To use loopback detection on an Ethernet interface, you must enable the function both globally andon the interface.• When the multi-port loopback detection function is enabled, the function can also detect single-portloops.• To disable loopback detection on all interfaces, run the undo loopback-detection enable commandin system view.• To enable a hybrid or trunk port to take the administratively specified protective action, you must usethe loopback-detection control enable command on the port.• When you change the link type of an Ethernet interface by using the port link-type command, theswitch removes the protective action configured on the interface. For more information about theport link-type command, see Layer 2—LAN Switching Command Reference.Configuration procedureTo configure loopback detection:Step Command Remarks1. Enter system view. system-view N/A2. Enable globalloopback detection. loopback-detection enable Disabled by default.3. Enable multi-portloopback detection.loopback-detectionmulti-port-mode enableOptional.By default, multi-port loopback detection isdisabled, and the switch can only detectsingle-port loopback.4. Set the loopbackdetection interval.loopback-detection interval-timetimeOptional.30 seconds by default.