R3166-R3206-HP High-End Firewalls Network Management Configuration Guide-6PW101

84
with this port in the MSTI). If the port receives no BPDUs with a higher priority within twice the forwarding
delay, it will revert to its original state.
Configure root guard on a designated port.
Follow these steps to enable root guard:
To do... Use the command...
Remarks
Enter system view system-view
Enter interface view or
Layer 2 aggregate
interface view
interface interface-type interface-number
Enable the root guard
function for the port(s)
stp root-protection
Required
Disabled by default.
NOTE:
You cannot configure root guard and loop guard on a port at the same time.
4. 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 may 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 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.
Configure loop guard 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 interface view or
Layer 2 aggregate
interface view
interface interface-type interface-number
Enable the loop guard
function for the ports
stp loop-protection
Required
Disabled by default.
NOTE:
Do not enable loop guard on a port connecting 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.
5. Enabling TC-BPDU guard
When a device receives topology change (TC) BPDUs, it flushes the forwarding address entries. If
someone forges TC-BPDUs to attack the device, the device will receive a large number of TC-BPDUs within
a short time and be busy with forwarding address entry flushing. This affects network stability.