Share this post on:

Introduction

Uplink fast is a feature of STP that allows very fast converge in case of uplink failure.

Configuration example – no UplinkFast enabled

A simple topology, S1 is a root bridge, S3 has two uplinks eth0/0 and eth0/1.

Let’s ping 192.168.1.2 and shutdown eth0/0 on S3 and see how many pings we lose:

S3(config)#int ethernet 0/1
S3(config-if)#shut
S3(config-if)#shutdown
S3(config-if)#
*Jan 19 15:24:29.003: STP: VLAN0001 new root port Et0/0, cost 200
*Jan 19 15:24:29.003: STP: VLAN0001 Et0/0 -> listening
*Jan 19 15:24:29.003: STP[1]: Generating TC trap for port Ethernet0/1
S3(config-if)#
*Jan 19 15:24:31.008: %LINK-5-CHANGED: Interface Ethernet0/1, changed state to administratively down
S3(config-if)#
*Jan 19 15:24:31.008: STP: VLAN0001 sent Topology Change Notice on Et0/0
*Jan 19 15:24:32.015: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/1, changed state to down
S3(config-if)#
*Jan 19 15:24:44.003: STP: VLAN0001 Et0/0 -> learning
S3(config-if)#
*Jan 19 15:24:59.004: STP[1]: Generating TC trap for port Ethernet0/0
*Jan 19 15:24:59.004: STP: VLAN0001 sent Topology Change Notice on Et0/0
*Jan 19 15:24:59.004: STP: VLAN0001 Et0/0 -> forwarding

I’ve lost about 20 pings with a single STP reconverge! Port had to go through all STP states: listening, learning and forwarding. We’d have to double it if the link flaps (goes down and comes back up).

UplinkFast

Let’s enable UplinkFast feature and see how it helps with convergence times.

S3(config)#spanning-tree uplinkfast

Once enabled, UplinkFast feature does following things:

  • sets ports costs to 3000 (so switch doesnt become a transit switch)
  • increases the STP priority (so this switch is unlikely to become a root bridge) to 49152
S03#sh spanning-tree 
 VLAN0001
   Spanning tree enabled protocol ieee
   Root ID    Priority    1
              Address     aabb.cc00.1000
              Cost        3100
              Port        1 (Ethernet0/0)
              Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
 Bridge ID  Priority    49153  (priority 49152 sys-id-ext 1)
              Address     aabb.cc00.2000
              Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
              Aging Time  300 sec
   Uplinkfast enabled
 Interface           Role Sts Cost      Prio.Nbr Type
 
 Et0/1               Root FWD 3100      128.1    Shr 
 Et0/0               Desg FWD 3100      128.2    Shr 
 Et0/2               Altn BLK 3100      128.3    Shr 
 Et0/3               Desg FWD 3100      128.4    Shr 

Let’s verify blocked ports:

S3#sh spanning-tree
 VLAN0001
   Spanning tree enabled protocol ieee
   Root ID    Priority    1
              Address     aabb.cc00.2000
              Cost        3100
              Port        2 (Ethernet0/1)
              Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
 Bridge ID  Priority    49153  (priority 49152 sys-id-ext 1)
              Address     aabb.cc00.3000
              Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
              Aging Time  300 sec
   Uplinkfast enabled
 Interface           Role Sts Cost      Prio.Nbr Type
 
 Et0/0               Altn BLK 3100      128.1    Shr
 Et0/1               Root FWD 3100      128.2    Shr
 Et0/2               Desg FWD 3100      128.3    Shr
 Et0/3               Desg FWD 3100      128.4    Shr

And we can verify uplink fast ports by entering command below:

S3#sh 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) : 0
 Name                 Interface List
 
 VLAN0001             Et0/1(fwd), Et0/0

OK, we can see that eth0/1 is the current active forwarding port and eth0/0 is a backup port.

Let’s shutdown eth0/1 again and see how many pings we lose:

S3(config)#int et
 S3(config)#int ethernet 0/1
 S3(config-if)#shu
 S3(config-if)#shutdown
 S3(config-if)#
 *Jan 19 15:36:47.096: STP: VLAN0001 new root port Et0/0, cost 3200
 *Jan 19 15:36:47.096: %SPANTREE_FAST-7-PORT_FWD_UPLINK: VLAN0001 Ethernet0/0 moved to Forwarding (UplinkFast).
 S3(config-if)#
 *Jan 19 15:36:47.096: STP[1]: Generating TC trap for port Ethernet0/0
 *Jan 19 15:36:47.096: STP[1]: Generating TC trap for port Ethernet0/1
 S3(config-if)#
 *Jan 19 15:36:49.095: %LINK-5-CHANGED: Interface Ethernet0/1, changed state to administratively down
 S3(config-if)#
 *Jan 19 15:36:49.103: STP: VLAN0001 sent Topology Change Notice on Et0/0
 S3(config-if)#
 *Jan 19 15:36:50.099: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/1, changed state to down

In this test, I didn’t lose a single ping, UPLINK fast is working, great! Let’s bring back up the eth0/1 and see if that causes any issues:

S3(config)#int ethernet 0/1
 S3(config-if)#
 S3(config-if)#no sh
 S3(config-if)#
 *Jan 19 15:39:42.437: set portid: VLAN0001 Et0/1: new port id 8002
 *Jan 19 15:39:42.437: STP: VLAN0001 Et0/1 -> listening
 S3(config-if)#
 *Jan 19 15:39:43.553: STP: VLAN0001 Et0/1: root port delay timer active
 *Jan 19 15:39:43.553: STP: VLAN0001 Et0/1 -> blocking
 *Jan 19 15:39:44.439: %LINK-3-UPDOWN: Interface Ethernet0/1, changed state to up
 S3(config-if)#
 *Jan 19 15:39:45.442: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/1, changed state to up
 S3(config-if)#

As we can see above, et0/1 went straight into blocking mode. After about 30seconds eth0/1 got moved into forwarding state again by UplinkFast:

*Jan 19 15:40:18.555: STP: VLAN0001 Et0/0 -> blocking (uplinkfast)
*Jan 19 15:40:18.555: STP[1]: Generating TC trap for port Ethernet0/0
*Jan 19 15:40:18.555: %SPANTREE_FAST-7-PORT_FWD_UPLINK: VLAN0001 Ethernet0/1 moved to Forwarding (UplinkFast).
S3(config-if)#
*Jan 19 15:40:18.555: STP[1]: Generating TC trap for port Ethernet0/1
*Jan 19 15:40:18.555: STP: VLAN0001 sent Topology Change Notice on Et0/1

Leave a Comment

Your email address will not be published. Required fields are marked *