receives a configuration BPDU with a higher priority from an MSTI, it immediately sets that port to the
listening state in the MSTI, without forwarding the packet. This is equivalent to disconnecting the link
connected to this port in the MSTI. If the port receives no BPDUs with a higher priority within twice the
forwarding delay, it reverts to its original state.
Make this configuration on a designated port.
Follow these steps to enable root guard:
To do...
Use the command...
Remarks
Enter system view
system-view
—
Enter Ethernet interface
view or Layer 2 aggregate
interface view
interface
interface-type
interface-number
Enter interface
view or port
group view
Enter port group view
port-group manual
port-group-name
Required
Use either command.
Enable the root guard function for the port(s)
stp root-protection
Required
Disabled by default.
NOTE:
Among loop guard, root guard and edge port settings, only one function (whichever is configured the
earliest) can at a time take effect on a port.
Enabling loop guard
By continuing to receive BPDUs from the upstream device, a device can maintain the state of the root port
and blocked ports. However, because of link congestion or unidirectional link failures, these ports might
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 transition 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,
its state transitions normally. Otherwise, it stays in the discarding state to prevent temporary loops.
Make this configuration on the root port and alternate ports of a device.
Follow these steps to enable loop guard:
To do...
Use the command...
Remarks
Enter system view
system-view
—
Enter Ethernet interface view
or Layer 2 aggregate
interface view
interface
interface-type
interface-number
Enter interface
view or port
group view
Enter port group view
port-group manual
port-group-name
Required
Use either command.
Enable the loop guard function for the ports
stp loop-protection
Required
Disabled by default.
80