Spanning Tree portfast and uplinkfast: It’s all about time.

People are getting crazy about the time, which is a good thing in general. I remember when I worked at a multinational telecom company, they showed me their new, impressive triple-play lab. One of their guys really bragged about their triple-play product. In a world where competition is so fierce, the nitty-gritty detail of a product may become the tiebreaker. She said that we got a deal with Bell-Canada because our product has a very impressive feature.

She stopped for two or three seconds, and I waited..

Then she started changing the TV channel and said, “look! when you surf between the channels, our product does not have the blue screen which last for 0.5 – 1 second! When you press from channel 2 to channel 3, you will get channel 3 ASAP. No blue screen in between. This is big!”

Well, that’s one example how timing is really critical in technology. What’s the relation with spanning tree portfast or uplinkfast?
Alright, let’s go to our main dishes!

Creating backup links between switches is a good idea to prevent network failures. It is a common, very good practice to establish redundant links between the switches.
However, with redundant links, we just open the door for frames to traverse the links simultaneously. This will create network loops which will hinder the performance of your network.
The Spanning Tree Protocol (STP) is used to prevent the network loop by shutting down any redundant links. For those who don’t know what STP is, then here is a link for you: http://en.wikipedia.org/wiki/Spanning_tree_protocol

As we know, the default time for STP to converge is 50 seconds. 50 Seconds? Is that too long?! What if I have a client that I am sure that it won’t create a network loop? Is there anyway that I can change to the backup link in case of the primary link fails? Portfast and uplinkfast are your answer!

– Portfast

Portfast can be used for some ports that we are sure that will not create network loops such as the ports that we connect to the end clients.
By applying portfast, these ports don’t have to spend the default 50 seconds to be in a forwarding state.

Here is the command:

Switch#config t
Switch#int fa0/1
Switch(config-if)#spanning-tree portfast
%Warning: portfast should only be enabled on ports connected to a
single host. Connecting hubs, concentrators, switches, bridges,
etc... to this interface when portfast is enabled, can cause
temporary bridging loops.
Use with CAUTION
%Portfast has been configured on FastEthernet0/1 but will only
have effect when the interface is in a non-trunking mode.

The long message is basically telling you to be careful. Remember, only apply portfast in ports that we are sure that they will not create network loops.

– Uplinkfast

When we have redundant links set up for our switches, we can use uplinkfast in the case that the primary link fails. Uplinkfast will speed up the “transition” from the failed primary link to the backup link (the port in a blocking state). Roughly said, uplinkfast will create an alternate path and put it somewhere. When the primary link fails, it just pops this alternate path from nowhere. Consequently, ports that apply uplinkfast don’t have to wait the normal 50 seconds of STP convergence time.

Here is the command:

Switch#config t
Switch#int fa0/1
Switch(config-if)#spanning-tree uplinkfast

By applying both portfast and uplinkfast correctly, we increase the performance of our networks!

Source: CCNA Study Guide by Todd Lammle, paraphrased by fadils.

7 thoughts on “Spanning Tree portfast and uplinkfast: It’s all about time.

  1. It’s amazing how many people buy high end network equipment and then do not utilise the features of it. Nice article, thanks.

    Ian

  2. looks like uplinkfast is not compatible with rapid-pvst?…

    3w#show spanning-tree uplinkfast
    UplinkFast is enabled but inactive in rapid-pvst mode

    Thanks,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s