Configuring Loop Protection on an Interface
Context
To maintain the status of root ports and blocked ports on a network running MSTP, a switching device receives BPDUs from an upstream switching device. If the switching device cannot receive these BPDUs because of link congestion or unidirectional-link failure, the switching device re-selects a root port. The original root port becomes a designated port and the original blocked ports change to the Forwarding state. This may create loops on the network. To prevent this issue from occurring, configure loop protection.
With loop protection enabled, if the root port or alternate port does not receive BPDUs from the upstream device for a long period, the switch sends a notification to the NMS. If the root port is used, the root port enters the Discarding state and becomes the designated port. If the alternate port is used, the alternate port remains blocked and becomes the designated port. This prevents loops from occurring. After the link congestion subsides or unidirectional link failures are rectified, the port receives BPDUs for negotiation and reverts to its original role and status.
An alternate port is a backup port for a root port. If a switching device has an alternate port, configure loop protection on both the root port and the alternate port.
Perform the following steps on the root port and alternate port on a switching device in an MST region.
Procedure
- Run system-view
The system view is displayed.
- Run interface interface-type interface-number
The Ethernet interface view is displayed.
- (Optional) Run stp binding process process-id
The port is bound to an MSTP process.
Skip this step if the interface belongs to process 0.
- Run stp loop-protection
Loop protection for the root port is configured on the switching device.
By default, loop protection is disabled.
Root protection and loop protection cannot be configured together.
- Run commit
The configuration is committed.