Section 4.10: Protecting Against the Sudden Loss of BPDUs
Cisco has introduced three STP features that assist in preventing and identifying against the loss of BPDUs.
4.10.1: BPDU Skew Detection Feature
A downstream switch can receive a BPDU that it relays for some time because the switch CPU is executing other functions. Lost BPDUs or those that arrive late can have an impact on the stability and reliability of the STP topology. The BPDU skew detection gauges the time lapse between the time a BPDU is expected and its actual arrival time, and tracks the period of the skewing condition. The time lapse period is known as skew time. BPDU skew detection uses syslog messages to report the condition. The messages are rate-limited so that it does not impact the switch CPU resources.
4.10.2: Loop Guard Feature
The feature keeps track of BPDU activity on nondesignated ports. Nondesignated ports are usually the Root Port, Alternate Root Ports, and all other ports that are usually blocking. The port remains in a normal state while it is receiving BPDUs. Loop Guard shifts the port into a loop-inconsistent state when BPDUs go missing. Once BPDUs are being received again, the port shifts via the normal STP states and is activated. In this manner, loop guard automatically manages ports with no manual interference.
The option is disabled by default on switch ports. The following command enables the option:
Switch(config-if)# spanning-tree guard loop
Loop Guard can be enabled on all switch ports, on a per-port basis. However, its counteractive blocking action is carried out on a per-VLAN basis.
4.10.3: Unidirectional link detection (UDLD) STP Feature
The UDLD STP feature interactively monitors and checks a port to ascertain whether a link is really bidirectional. A switch transmits Layer 2 UDLD frames that identify the switch port periodically. When the end switch adds its switch port's identification and echoes the frame across the same link, the link is bidirectional. Both ports are identified in the frame. The link is unidirectional when these echoed frames are not perceived. The function of UDLD is to identify a unidirectional link ahead of STP shifting a Blocked port into the Forwarding state.
UDLD has two operation methods:
• When operating in Normal Mode, the port continues to operate once a unidirectional link is perceived. UDLD sends a syslog message indicating that the port is in an undetermined state.
• When in Aggressive Mode, the switch re-establishes the link once a unidirectional link condition is perceived. UDLD messages are transmitted every 8 seconds. The port is put into the errdisable state when these messages are not echoed back. The port cannot be used in this state.
The option is disabled by default on switch ports. UDLD can be enabled on all ports on a per-port basis, or it can be globally enabled on ports that use fiber-optic media. UDLD can be separately enabled on non-fiber links. The following global configuration command globally enables the option:
Switch(config)# udld {aggressive | enable | message time seconds}
keyword to enable Aggressive Mode.
Use the enable keyword to enable Normal Mode and the aggressive
The following interface configuration command enables or disables UDLD on single switch ports:
Switch(config-if)# udld {aggressive | disable | enable}
The disable keyword disables UDLD.