Spanning-Tree UplinkFast

Uplinkfast is a spanning-tree feature that was created to improve the convergence time. In this lesson we’ll take a look at how uplinkfast works. Here’s the topology that I will use to demonstrate it:

spanning tree uplinkfast topology

Three switches and SW1 is our root bridge. The fa0/16 interface on SW3 has been blocked. I’m only using VLAN 1 so nothing fancy here…

If we look at SW3 we see that the fa0/16 interface has been blocked and fa0/14 is the root port. Let’s see what happens with this topology when one of the links fails:

spanning tree uplinkfast link failure

When the fa0/14 interface on SW3 fails we’ll have to use fa0/16 to reach the root bridge. How long does it take for SW3 to make the transition? Let’s find out:

SW3#debug spanning-tree events 
Spanning Tree event debugging is on
SW3(config)#interface fa0/14
SW3(config-if)#shutdown

Now we’ll just wait for the magic to happen…

SW3#STP: VLAN0001 new root port Fa0/16, cost 38
SW3#STP: VLAN0001 Fa0/16 -> listening
SW3#STP: VLAN0001 Fa0/16 -> learning
SW3#STP: VLAN0001 Fa0/16 -> forwarding

BPDUs are originated from the root bridge so if we receive BPDUs on an interface the switch knows it can reach the root bridge on this interface. We have to go through the listening (15 seconds) and learning state (15 seconds) so it takes 30 seconds to end up in the forwarding state.

The good thing is that spanning-tree solves the link failure automatically but it also means that we have a downtime of 30 seconds. If you want you can tune the forward delay timer to speed up this process down to roughly 14 seconds.

SW3(config)#interface fa0/14
SW3(config-if)#no shutdown

Let’s restore connectivity first.

SW3(config)#spanning-tree uplinkfast

Now I’m going to enable spanning-tree uplinkfast. This is a global command, you can’t configure it on the interface level.

SW3(config)#interface fa0/14
SW3(config-if)#shutdown
SW3# STP: VLAN0001 new root port Fa0/16, cost 3038
SW3# %SPANTREE_FAST-7-PORT_FWD_UPLINK: VLAN0001 FastEthernet0/16 moved to Forwarding (UplinkFast).

Here’s the big difference. When uplinkfast is enabled a non-designated port will go to forwarding state immediately if the root port fails. Instead of 30 seconds downtime connectivity is restored immediately.

UplinkFast is useful but it will cause a problem with our MAC address tables. In the picture above I added two computers to our topology. Interface fa0/16 on SW3 is the non-designated port and fa0/14 is the root port. Take a look at the following topology:

spanning tree uplinkfast computers

Let me show you the MAC address tables for all switches:

SW1#show mac address-table dynamic 
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
   1    000c.2928.5c6c    DYNAMIC     Fa0/14
   1    000c.29e2.03ba    DYNAMIC     Fa0/17
SW2#show mac address-table dynamic 
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
   1    000c.2928.5c6c    DYNAMIC     Fa0/2
   1    000c.29e2.03ba    DYNAMIC     Fa0/14
SW3#show mac address-table dynamic 
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
   1    000c.2928.5c6c    DYNAMIC     Fa0/14
   1    000c.29e2.03ba    DYNAMIC     Fa0/3

Here are the MAC addresses of the computers:

  • H1: 000c.2928.5c6c
  • H2: 000c.29e2.03ba

spanning tree uplinkfast link failure 2

When the link between SW1 and SW3 fails, SW3 will use the fa0/16 interface immediately. However it will take 15 seconds for the topology change mechanism to age out the MAC address table!

SW2#show mac address-table dynamic 
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
   1    000c.2928.5c6c    DYNAMIC     Fa0/2
   1    000c.29e2.03ba    DYNAMIC     Fa0/14

Take a look again at the MAC address table for SW2. The MAC address (000c.29e2.03ba) that I highlighted belongs to H2. When SW2 receives an Ethernet Frame for H2 it will be forwarded to SW1 and it will be dropped! (Well at least for 15 seconds until the topology change mechanism kicks in…).

Of course we have a solution to speed this up, here’s what we will do:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You've Ever Spent on Your Cisco Career!
  • Full Access to our 655 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

561 Sign Ups in the last 30 days

satisfaction-guaranteed
100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Forum Replies

  1. Hi Rene, excelent post.
    However, I have some doubts about this topic. I read that using RSTP we have some improvements similar to Uplink and Backbone Fast. So, we don´t have to use this features on RSTP. Is that correct?

    This output was taken from a Cat3750: “UplinkFast is enabled but inactive in rapid-pvst mode”
    Can you help me with this??

    Whatever, your example is fantastic.

  2. Hlw Rene,

    Nice explanation in right WAY, GREAT !

    So , if we use Uplinkfast then no downtime occure ?? So how SWITCHC will update its MAC table as SWITCHB updated its MAC table using Multiicast Frame sending by SWITCHC ? I think there is 15 sec downtime needed due MAC table flush in SWITCHC.

    Another Questions …After STP convergence , Only Root Bridge will send BPDU(Hello time interval) and other SWITCH will receive BPDU [if no Topology Chage].

    br//
    zaman

  3. Hello florian.

    To answer your first question:

    But this is only the case if uplink-fast is configured, right?
    If it is not configured the port would stay in block state for 20 sec and then move through the other states!?

    Yes, my description in the above post is for situations where uplinkfast is not implemented. In case uplinkfast is configured, this is reduced from 30 seconds to almost 0 seconds. Cisco explains it like so:

    The UplinkFast feature is based on the definition of an uplink group. On a given switch, the uplink group consists of the root port and al
    ... Continue reading in our forum

  4. Hello Maodo

    In the TCN lesson, it mentions that there will be a maximum of 50 seconds

    ... Continue reading in our forum

  5. Hello Maodo

    The link failure is also detected on SW1 however, the example examines the behaviour of the ports on SW3.

    In the diagram, @ReneMolenaar still has the (D) showing up on port fa0/17 on SW1,

    ... Continue reading in our forum

42 more replies! Ask a question or join the discussion by visiting our Community Forum