Section 4.6: Convergence

There are additional methods that exist to allow faster STP convergence in the event of a link failure. These include: PortFast, UplinkFast, and BackboneFast.

4.6.1: PortFast: Access Layer Nodes

An end-user workstation is usually connected to a switch port in the Access layer. If the workstation is powered off and then turned on, the switch port will not be in a useable state until STP cycles from the Blocking state to the Forwarding state. With the default STP timers, this transition will take at least 30 seconds. Therefore, the workstation is unable to transmit or receive any data for 30 seconds.

On switch ports that connect only to single workstations or specific devices, bridging loops will not be possible. Catalyst switches offer the PortFast feature that shortens the Listening and Learning states to a negligible amount of time. The result is that when a workstation link comes up, the switch will immediately move the PortFast port into the Forwarding state. Spanning-Tree loop detection is still in operation, however, and the port will be moved into the Blocking state if a loop is detected on the port. To enable or disable the PortFast feature on a CLI-based switch port, use the following command:

Switch(enable) set spantree portfast { module_number/port_number } { enable | disable }

On an IOS-based switch, you can use the following command:

Switch (config-if)# spanning-tree portfast

You should not enable PortFast on a switch port that is connected to a hub or another switch because bridging loops could form. To view the PortFast state of switch ports, use the show spantree command.

4.6.2: UplinkFast: Access Layer Uplinks

If an Access layer switch has redundant uplink connections to two Distribution layer switches, one uplink would be in the Forwarding state and the other in the Blocking state. If the primary uplink went down, up to 50 seconds would elapse before the redundant uplink could be used. The UplinkFast feature on Catalyst switches enables leaf-node switches or switches at the ends of the Spanning-Tree branches to have a functioning Root Port while keeping one or more redundant or potential Root Ports in Blocking mode. When the primary Root Port uplink fails, another blocked uplink can be immediately brought up for use. To enable or disable the UplinkFast feature on a CLI-based switch, use the following command:

Switch (enable) set spantree uplinkfast { enable | disable } [ rate update_rate ] [ all-protocols off | on ]

On an IOS-based switch, you can use the following command:

Switch (config)# spanning-tree uplinkfast [ max-update-rate pkts_per_second ]

When UplinkFast is enabled, it is enabled for the whole switch and all VLANs. UplinkFast works by keeping track of possible paths to the Root Bridge. Therefore, the command is not allowed on the Root Bridge switch. UplinkFast also makes some modifications to the local switch to insure that it does not become the Root Bridge and that the switch is not used as a transit switch to get to the Root Bridge. The IOS-based switch command uses a max-update-rate parameter to set the rate of multicast updates. To view the current UplinkFast parameters and ports, use the show spantree uplinkfast command.

4.6.3: BackboneFast: Redundant Backbone Paths

In the Core layer, a different method is used to shorten STP convergence. BackboneFast works by having a switch actively determine if alternate paths exist to the root bridge in the event that the switch detects an indirect link failure. Indirect link failures occur when a link not directly connected to a switch fails. A switch detects an indirect link failure when it receives inferior BPDUs from its Designated Bridge on either its root port or a blocked port. Normally, a switch must wait for the Max Age timer to expire before responding to the inferior BPDUs. However, BackboneFast begins to determine if other alternate paths to the Root Bridge exist according to the type of port that received the inferior BPDU:

• If the inferior BPDU arrives on a port in the Blocking state, the switch considers the root port and all other blocked ports to be alternate paths to the root bridge.

• If the inferior BPDU arrives on the root port, the switch considers all blocked ports to be alternate paths to the root bridge.

However, if the inferior BPDU arrives on the root port and there are no blocked ports, the switch assumes it has lost connectivity with the root bridge. In this event, the switch will assume that it has become the root bridge and BackboneFast will allow it to do so before the Max Age timer expires.

If the local switch has blocked ports, BackboneFast begins to use the Root Link Query (RLQ) protocol to see if there are upstream switches that have stable connections to the Root Bridge. RLQ Requests are sent out. If a switch receives an RLQ Request and is either the Root Bridge or has lost connection to the Root, it sends an RLQ Reply. Otherwise, the RLQ Request is propagated on to other switches until an RLQ Reply can be generated. On the local switch, if an RLQ Reply is received on its current Root Port, the path to the Root Bridge is intact and stable. If it is received on a non-Root Port, an alternate Root Path must be chosen. The Max Age Timer is immediately expired so that a new Root Port can be found.

BackboneFast is simple to configure and operates by short-circuiting the Max Age Timer when needed. Although this function shortens the time a switch waits to detect a Root Path failure, ports still must go through full-length Forward Delay Timer intervals during the Listening and Learning states. Where PortFast and UplinkFast enabled immediate transitions, BackboneFast can only reduce the maximum convergence delay from 50 to 30 seconds. To configure BackboneFast, you can use the following command:

Switch (enable) set spantree backbonefast { enable | disable }

When used, BackboneFast should be enabled on all switches in the network because BackboneFast requires the use of the RLQ request and reply mechanism to inform switches of Root Path stability. The RLQ protocol is only active when BackboneFast is enabled on a switch. By default, BackboneFast is disabled.