Improving STP Stability
STP Root Guard helps enforce the root bridge placement and identity in a switched
■
network. When enabled on a port, Root Guard disables the port if a better BPDU is
received. This prevents other unplanned switches from becoming the root.
STP Root Guard should be enabled on all ports where the root bridge should not
■
appear. This preserves the current choice of the primary and secondary root bridges.
Unidirectional Link Detection (UDLD) provides a means to detect a link that is
■
transmitting in only one direction, enabling you to prevent bridging loops and traffic
black holes that are not normally detected or prevented by STP.
UDLD operates at Layer 2 by sending packets containing the device and port ID to
■
connected neighbors on switch ports. As well, any UDLD packets received from a
neighbor are reflected back so that the neighbor can see it has been recognized.
UDLD messages are sent at the message interval times, usually defaulting to 15 sec-
onds.
UDLD operates in two modes:
■
Normal mode: Unidirectional links are detected and reported as an error, but no
■
other action is taken.
Aggressive mode: Unidirectional links are detected, reported as an error, and dis-
■
abled after eight attempts (once a second for eight seconds) to reestablish the link.
Disabled ports must be manually reenabled.
STP Loop Guard detects the absence of BPDUs on the root and alternate root ports.
■
Nondesignated ports are temporarily disabled, preventing them from becoming des-
ignated ports and moving into the forwarding state.
■
STP Loop Guard should be enabled on the root and alternate root ports (both non-
designated) for all possible active STP topologies.
STP Operation Example
As an example of STP operation, consider a network of three Catalyst switches connect-
ed in a triangle fashion as illustrated in Figure 7-1. RP labels the root ports, DP labels des-
ignated ports, F labels ports in the forwarding state, and X labels ports that are in the
blocking state.
The spanning-tree algorithm proceeds as follows:
The root bridge is elected: All three switches have equal bridge priorities (32768, the
1.
default). However, Catalyst A has the lowest MAC address (00-00-00-00-00-0a), so it
becomes the root bridge.
The root ports are chosen: The lowest root path costs are computed on each switch.
2.
These are Catalyst B port 1/1, which has a root path cost of 0+19, and Catalyst C
port 1/1, which also has a root path cost of 0+19.
Chapter 7: Spanning Tree Protocol (STP) 115