Configuring guard functions, Introduction, Bpdu guard – H3C Technologies H3C WX3000 Series Unified Switches User Manual

Page 203: Root guard, Loop guard

Advertising
background image

22-34

<device> system-view

[device] stp interface GigabitEthernet1/0/1 mcheck

2) Perform this configuration in Ethernet port view

<device> system-view

[device] interface GigabitEthernet1/0/1

[device-GigabitEthernet1/0/1] stp mcheck

Configuring Guard Functions

Introduction

The following guard functions are available on an MSTP-enabled device: BPDU guard, root guard, loop
guard, TC-BPDU attack guard, and BPDU drop.

BPDU guard

Normally, the access ports of the devices operating on the access layer are directly connected to
terminals (such as PCs) or file servers. These ports are usually configured as edge ports to achieve
rapid transition. But they resume non-edge ports automatically upon receiving configuration BPDUs,
which causes spanning tree recalculation and network topology jitter.

Normally, no configuration BPDU will reach edge ports. But malicious users can attack a network by
sending configuration BPDUs deliberately to edge ports to cause network jitter. You can prevent this
type of attacks by utilizing the BPDU guard function. With this function enabled on a device, the device
shuts down the edge ports that receive configuration BPDUs and then reports these cases to the
administrator. Ports shut down in this way can only be restored by the administrator.

Root guard

A root bridge and its secondary root bridges must reside in the same region. The root bridge of the CIST
and its secondary root bridges are usually located in the high-bandwidth core region. Configuration
errors or attacks may result in configuration BPDUs with their priorities higher than that of a root bridge,
which causes a new root bridge to be elected and network topology jitter to occur. In this case, flows that
should travel along high-speed links may be led to low-speed links, and network congestion may occur.

You can avoid this problem by utilizing the root guard function. Ports with this function enabled can only
be kept as designated ports in all spanning tree instances. When a port of this type receives
configuration BPDUs with higher priorities, it turns to the discarding state (rather than become a
non-designated port) and stops forwarding packets (as if it is disconnected from the link). It resumes the
normal state if it does not receive any configuration BPDUs with higher priorities for a specified period.

Loop guard

A device maintains the states of the root port and other blocked ports by receiving and processing
BPDUs from the upstream device. These BPDUs may get lost because of network congestions or
unidirectional link failures. If a device does not receive BPDUs from the upstream device for certain
period, the device selects a new root port; the original root port becomes a designated port; and the
blocked ports turns to the forwarding state. This may cause loops in the network.

The loop guard function suppresses loops. With this function enabled, if link congestions or
unidirectional link failures occur, both the root port and the blocked ports become designated ports and
turn to the discarding state. In this case, they stop forwarding packets, and thereby loops can be
prevented.

Advertising