You can configure loop detect and block priorities in the interface view.
The system view is displayed.
The Ethernet interface view is displayed.
The loop detection function is enabled on the interface.
The sub-interface of the AC interface or a main interface is enabled to delete MAC address entries when its loop detection status changes.
The loop-detect mac-withdraw enable command speeds up traffic switching.
The blocking priority of the interface is configured.
The smaller the value of priority is, the higher blocking priority is for the interface. The interface with a higher blocking priority is blocked preemptively when a loop is detected. The default priority value is 0.
The interface is blocked when a loop is detected.
By specifying the parameter block-time, you can set the interval for unblocking an interface. That is, if the blocked interface receives no loop detect packet during block-time, the interface is unblocked. In order to avoid interface flapping, if the immediate Down/Up function is enabled on the blocked interface, that is step 6, the block-time should be no shorter than 10 seconds.
If the parameter block-time is not set, the interface is blocked permanently. That is, when no loop occurs on the network, and the blocked interface receives no loop detect packet any more, the interface is still in the blocking state.
For the interface in the permanent blocking state, if the blocking priorities of the interfaces on the network are adjusted, the interface is unblocked when another interface is set with a higher blocking priority. The interface with a higher blocking priority is then blocked permanently. For example, GE 0/1/0.1 and GE 0/1/8.1 are in the same VPLS, and a loop occurs on these GE interfaces. The blocking priority of GE 0/1/0.1 is 50, and the blocking priority of GE 0/1/8.1 is 100. In this case, GE 0/1/0.1 is in the permanent blocking state. If the blocking priority of GE 0/1/8.1 is adjusted to 25, GE 0/1/0.1 is unblocked, and GE 0/1/8.1 enters the blocking state.
The immediate interface Down/Up event is triggered after a loop is detected.
By default, the blocked interface only stops forwarding traffic, but the physical and protocol status of the interface is still Up. Therefore, each table on the interface, such as the MAC address table, cannot be updated immediately. As a result, the user traffic is still sent to the interface continuously after the interface is blocked, which leads to traffic interruption. If the immediate Down/Up function is enabled on the blocked interface, the interface goes Down, and relevant tables on the interface are updated. When the timer times out after approximately five seconds, the interface goes Up. In this manner, the user traffic is not lost.
The interface is configured to report an alarm only if a loop is detected, without blocking itself.
An authentication identifier for L2VPN loop detection is configured on the interface.
If an authentication identifier for L2VPN loop detection is configured in both the interface view and global view, the configuration in the interface view is preferentially used.
After an authentication identifier is configured on the local device, if the identifier in the detection packet received from a peer device is different from the local one, the local device discards the packet.
A VLAN range for the main interface to send loop detection packets is set.
This command can be run on a sub-interface for dot1q VLAN tag termination or its main interface. For details about the configuration on a sub-interface for dot1q VLAN tag termination, see (Optional) Configuring the VLAN Range for Loop Detection Packets Sent by a Sub-interface for VLAN Tag Termination.
The configuration is committed.