100
Step Command
Remarks
2.
Enter interface view or port
group view.
•
Enter Layer 2 Ethernet interface view
or Layer 2 aggregate interface view:
interface
interface-type
interface-number
•
Enter port group view:
port-group manual
port-group-name
Use either command.
3.
Enable the root guard function
for the ports.
stp root-protection
Disabled by default.
NOTE:
You cannot configure root guard and loop guard on a port at the same time.
Enabling loop guard
A device that keeps receiving BPDUs from the upstream device can maintain the state of the root port and
blocked ports. However, link congestion or unidirectional link failures might cause these ports to fail to
receive BPDUs from the upstream devices. The device will reselect the port roles: Those ports in
forwarding state that failed to receive upstream BPDUs will become designated ports, and the blocked
ports will transit to the forwarding state, resulting in loops in the switched network. The loop guard
function can suppress the occurrence of such loops.
The initial state of a loop guard-enabled port is discarding in every MSTI. When the port receives BPDUs,
it transits its state. Otherwise, it stays in the discarding state to prevent temporary loops.
Configure loop guard on the root port and alternate ports of a device.
To enable loop guard:
Step Command
Remarks
1.
Enter system view.
system-view
N/A
2.
Enter interface view or port
group view.
•
Enter Layer 2 Ethernet interface view
or Layer 2 aggregate interface view:
interface
interface-type
interface-number
•
Enter port group view:
port-group manual
port-group-name
Use either command.
3.
Enable the loop guard
function for the ports.
stp loop-protection
Disabled by default.
NOTE:
•
Do not enable loop guard on a port that connects user terminals. Otherwise, the port will stay in the
discarding state in all MSTIs because it cannot receive BPDUs.
•
You cannot configure edge port settings and loop guard, or configure root guard and loop guard on a
port at the same time.