Classic STP takes 30 seconds to recover from a direct failure, and 50 seconds from an indirect one (the “Port states and timers” lesson). Cisco added two features to make this faster. Both are old now: Rapid PVST+ (the Rapid Spanning Tree lessons) does the same jobs by itself. But they are still worth learning, because they help explain why RSTP works the way it does.
UplinkFast: direct failures on access switches
Situation: an access switch (AS1) has two uplinks. One is its root port to DS1 (the root). The other is a blocked backup to DS2. The uplink on the root port fails.
- 1. Normal. AS1 uses its root port to DS1.
- 2. The root-port uplink fails. Classic STP would now wait 30 s in listening and learning.
- 3. UplinkFast switches over at once. AS1 already knows its backup uplink leads to the root. So it moves it straight to forwarding.
- 4. Upstream tables updated. AS1 sends frames using its users' MAC addresses as the source. So the distribution switches learn the new path at once.
spanning-tree uplinkfastFor the whole switch. Use it on access switches only.
Side effects (on purpose): turning on UplinkFast raises the switch's bridge priority to 49152. It also adds 3000 to its port costs. So the switch never becomes the root, and other switches never send traffic through it. That's why it is only for access switches.
Why skipping listening and learning is safe here
Listening and learning are there to stop short loops. But when an access switch's own root port fails, the loop through it is gone, because the broken cable was part of that loop. The backup uplink is now the only path, so it can forward at once.
AS1#! root port Gi1/0/1 fails, without UplinkFast 09:00:00.200: STP: VLAN0010 new root port Gi1/0/2, cost 8 09:00:00.200: STP: VLAN0010 Gi1/0/2 -> listening 09:00:15.200: STP: VLAN0010 Gi1/0/2 -> learning 09:00:30.200: STP: VLAN0010 Gi1/0/2 -> forwarding
AS1#! the same failure, with UplinkFast 09:10:00.200: STP: VLAN0010 new root port Gi1/0/2, cost 3008 09:10:00.200: %SPANTREE_FAST-7-PORT_FWD_UPLINK: VLAN0010 GigabitEthernet1/0/2 moved to Forwarding (UplinkFast).
Step by step
- Turn it on once, for the whole switch. It works for every VLAN. There is no per-port setting (unlike PortFast).
- Normal work. The switch keeps a list of its uplinks (the uplink group): the root port, plus the blocked ports that receive BPDUs from the switches above.
- Notice the failure. Only a direct failure counts: the root port's own link going down. A failure somewhere else still takes the normal 30–50 s.
- Recover. The best backup uplink becomes the root port and forwards at once.
- Fix the MAC tables above. The distribution switches still think AS1's users are behind the broken link. So AS1 sends one frame for each MAC in its table, to the address
0100.0ccd.cdcd. Each frame uses a user's MAC as the source. The switches above then learn the users on the new path.
AS1#show spanning-tree uplinkfast UplinkFast is enabled Station update rate set to 150 packets/sec. UplinkFast statistics ----------------------- Number of transitions via uplinkFast (all VLANs) : 1 Number of proxy multicast addresses transmitted (all VLANs) : 42 Name Interface List -------------------- ------------------------------------ VLAN0010 Gi1/0/1(fwd), Gi1/0/2
spanning-tree uplinkfast max-update-rate (0 sends none).⚠️ Never use it on the root bridge, or on distribution or core switches. The higher priority and costs are meant to keep the switch at the edge of the tree.
BackboneFast: indirect failures
Situation: the SW1–SW2 link fails. SW2 loses its path to the root, so it starts saying it is the root. It sends worse (inferior) BPDUs to SW3. With classic STP, SW3 ignores them until its stored information runs out (max age, 20 s).
- 1. A link that SW3 is not on fails. SW2 loses its root port.
- 2. SW2 says it is the root. SW3 receives a worse BPDU on its blocked port. Without BackboneFast, it would wait 20 s.
- 3. SW3 checks with the root. BackboneFast sends a Root Link Query (RLQ) out of its root port, to ask if the root is still there.
- 4. Root is reachable. SW3 throws away the old information at once, without waiting for max age.
- 5. SW2 learns the real root. SW3's port toward SW2 becomes designated (after listening and learning). SW2 now reaches SW1 through SW3. This takes about 30 s instead of 50.
spanning-tree backbonefastFor the whole switch, on every switch in the network. RLQs only work if all switches understand them.
Why RSTP replaced them
| Old feature | How RSTP does it |
|---|---|
| PortFast | Edge ports (still configured with PortFast) |
| UplinkFast | Alternate ports that start forwarding at once |
| BackboneFast | Switches accept worse information and agree with each other at once. No max-age wait. |
On a switch that runs Rapid PVST+, you don't need UplinkFast or BackboneFast.
Check yourself
Where should UplinkFast be enabled?
How much time does BackboneFast save after an indirect failure?