This post covers the advanced STP features PortFast, UplinkFast, and BackboneFast. The topology is the same as in the previous post. However, SW2 is the root bridge this time. Not quite sure why the root bridge changed from SW4 to SW2 when I restarted the simulation. I've also enabled interface Gi1/3 to demonstrate the PortFast feature. Anyway, on with the show...
SW1#debug spanning-tree events
SW1(config)#interface GigabitEthernet1/3
SW1(config-if)#no shutdown
*Oct 15 16:01:37.341: set portid: VLAN0001 Gi1/3: new port id 8008
*Oct 15 16:01:37.341: STP: VLAN0001 Gi1/3 -> listening
*Oct 15 16:01:39.187: %LINK-3-UPDOWN: Interface GigabitEthernet1/3, changed state to up
*Oct 15 16:01:40.187: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/3, changed state to up
*Oct 15 16:01:52.341: STP: VLAN0001 Gi1/3 -> learning
*Oct 15 16:02:07.341: STP[1]: Generating TC trap for port GigabitEthernet1/3
*Oct 15 16:02:07.343: STP: VLAN0001 sent Topology Change Notice on Gi1/1
*Oct 15 16:02:07.343: STP: VLAN0001 Gi1/3 -> forwarding
From the time stamps, you can see that it took 30 seconds to go from the listening to forwarding.
Now, enable the PorFast feature on the interface. The IOS issues a warning that enabling the PortFast feature on a wrong interface could cause a temporary loop and points out that PortFast will only work when the interface is in (operational) access mode.
SW1(config)#interface GigabitEthernet1/3
SW1(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 GigabitEthernet1/3 but will only
have effect when the interface is in a non-trunking mode.
Let's verify the interface (operational) mode and the status of PortFast.
SW1(config)#do show interface GigabitEthernet1/3 switchport
Name: Gi1/3
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: static access
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: native
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: none
Note that the administrative mode is dynamic auto and operational mode is static access.
SW1#show spanning-tree interface GigabitEthernet1/3 portfast
VLAN0001 enabled
SW1#show spanning-tree interface GigabitEthernet1/3 detail
Port 8 (GigabitEthernet1/3) of VLAN0001 is designated forwarding
Port path cost 4, Port priority 128, Port Identifier 128.8.
Designated root has priority 32769, address fa16.3e60.caae
Designated bridge has priority 32769, address fa16.3e7c.8ef1
Designated port id is 128.8, designated path cost 4
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
The port is in the portfast edge mode
Link type is shared by default
BPDU: sent 207, received 0
STP debugging is still on. Let's shutdown and no shutdown the Gi1/3 interface.
SW1(config)#interface GigabitEthernet1/3
SW1(config-if)#shutdown
*Oct 15 16:12:45.088: %LINK-5-CHANGED: Interface GigabitEthernet1/3, changed state to administratively down
*Oct 15 16:12:46.088: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/3, changed state to down
SW1(config-if)#no shutdown
*Oct 15 16:13:33.829: set portid: VLAN0001 Gi1/3: new port id 8008
*Oct 15 16:13:33.829: STP: VLAN0001 Gi1/3 ->jump to forwarding from blocking
*Oct 15 16:13:35.675: %LINK-3-UPDOWN: Interface GigabitEthernet1/3, changed state to up
*Oct 15 16:13:36.675: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/3, changed state to up
Note that STP did not generate a topology change notification when the interface went down or came up, and the port was immediately put into forwarding from blocking.
Now, remove the PortFast configuration from the interface.
SW1(config)#interface GigabitEthernet1/3
SW1(config-if)#no spanning-tree portfast
SW1#do show spanning-tree interface GigabitEthernet1/3 portfast
VLAN0001 disabled
Next, enable PortFast globally, which applies it to all ports in access mode. Verify it is enabled on interface GigabitEthernet1/3 again. Shutting down the interface and bringing it back up would generate the same output as before.
SW1(config)#spanning-tree portfast default
%Warning: this command enables portfast by default on all interfaces. You
should now disable portfast explicitly on switched ports leading to hubs,
switches and bridges as they may create temporary bridging loops.
SW1#show spanning-tree interface GigabitEthernet1/3 portfast
VLAN0001 enabled
SW1(config)#do show spanning-tree interface gi1/3 detail
Port 8 (GigabitEthernet1/3) of VLAN0001 is designated forwarding
Port path cost 4, Port priority 128, Port Identifier 128.8.
Designated root has priority 32769, address fa16.3e60.caae
Designated bridge has priority 32769, address fa16.3e7c.8ef1
Designated port id is 128.8, designated path cost 4
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
The port is in the portfast edge mode by default
Link type is shared by default
BPDU: sent 207, received 0
SW1#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address fa16.3e60.caae
Cost 4
Port 6 (GigabitEthernet1/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address fa16.3e7c.8ef1
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi0/1 Desg FWD 4 128.2 Shr
Gi0/2 Desg FWD 4 128.3 Shr
Gi0/3 Desg FWD 4 128.4 Shr
Gi1/0 Desg FWD 4 128.5 Shr
Gi1/1 Root FWD 4 128.6 Shr
Gi1/2 Altn BLK 4 128.7 Shr
SW1(config)#interface GigabitEthernet1/1
SW1(config-if)#shutdown
*Oct 15 16:29:24.406: STP: VLAN0001 new root port Gi1/2, cost 4
*Oct 15 16:29:24.406: STP: VLAN0001 Gi1/2 -> listening
*Oct 15 16:29:26.379: %LINK-5-CHANGED: Interface GigabitEthernet1/1, changed state to administratively down
*Oct 15 16:29:27.379: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to down
*Oct 15 16:29:39.407: STP: VLAN0001 Gi1/2 -> learning
*Oct 15 16:29:54.409: STP: VLAN0001 Gi1/2 -> forwarding
From the time stamps, you can see the convergence took 30 seconds.
Next, revert back the changes (re-enable Gi1/1) and enable UplinkFast.
SW1(config)#interface GigabitEthernet1/1
SW1(config-if)#no shutdown
SW1(config)#spanning-tree uplinkfast
SW1# show spanning-tree summary
Switch is in pvst mode
Root bridge for: none
Extended system ID is enabled
Portfast Default is disabled
Portfast Edge BPDU Guard Default is disabled
Portfast Edge BPDU Filter Default is disabled
Loopguard Default is disabled
PVST Simulation Default is enabled but inactive in pvst mode
Bridge Assurance is enabled but inactive in pvst mode
EtherChannel misconfig guard is enabled
Configured Pathcost method used is short
UplinkFast is enabled
BackboneFast is disabled
Name Blocking Listening Learning Forwarding STP Active
---------------------- -------- --------- -------- ---------- ----------
VLAN0001 5 0 0 3 8
---------------------- -------- --------- -------- ---------- ----------
1 vlan 5 0 0 3 8
Station update rate set to 150 packets/sec.
UplinkFast statistics
-----------------------
Number of transitions via uplinkFast (all VLANs) : 0
Number of proxy multicast addresses transmitted (all VLANs) : 0
SW1#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address fa16.3e60.caae
Cost 3004
Port 6 (GigabitEthernet1/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 49153 (priority 49152 sys-id-ext 1)
Address fa16.3e7c.8ef1
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
------------------- ---- --- --------- -------- --------------------------------
Gi0/1 Desg FWD 3004 128.2 Shr
Gi0/2 Desg FWD 3004 128.3 Shr
Gi0/3 Desg FWD 3004 128.4 Shr
Gi1/0 Desg FWD 3004 128.5 Shr
Gi1/1 Root FWD 3004 128.6 Shr
Gi1/2 Altn BLK 3004 128.7 Shr
Note that when the UplinkFast feature is enaled, the STP priority is increased to 49152 and 3000 is added to the port costs.
Now, let's shutdown Gi1/1 again and watch how fast a new root port is selected.
SW1(config)#interface GigabitEthernet1/1
SW1(config-if)#shutdown
*Oct 15 16:36:18.102: STP: VLAN0001 new root port Gi1/2, cost 3004
*Oct 15 16:36:18.102: %SPANTREE_FAST-7-PORT_FWD_UPLINK: VLAN0001 GigabitEthernet1/2 moved to Forwarding (UplinkFast).
*Oct 15 16:36:20.077: %LINK-5-CHANGED: Interface GigabitEthernet1/1, changed state to administratively down
*Oct 15 16:36:21.077: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to down
The convergence is immediate.
SW1#show spanning-tree summary
Switch is in pvst mode
Root bridge for: none
Extended system ID is enabled
Portfast Default is disabled
Portfast Edge BPDU Guard Default is disabled
Portfast Edge BPDU Filter Default is disabled
Loopguard Default is disabled
PVST Simulation Default is enabled but inactive in pvst mode
Bridge Assurance is enabled but inactive in pvst mode
EtherChannel misconfig guard is enabled
Configured Pathcost method used is short
UplinkFast is enabled
BackboneFast is disabled
Name Blocking Listening Learning Forwarding STP Active
---------------------- -------- --------- -------- ---------- ----------
VLAN0001 4 0 0 3 7
---------------------- -------- --------- -------- ---------- ----------
1 vlan 4 0 0 3 7
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
No dummy multicast packets were sent because there has been no user traffic so the CAM table is not populated.
Let's see what happens, when the current root port Gi0/3 on SW1 is shut down.
SW1(config)#interface GigabitEthernet0/3
SW1(config-if)#shutdown
*Oct 15 17:22:22.601: %LINK-5-CHANGED: Interface GigabitEthernet0/3, changed state to administratively down
*Oct 15 17:22:23.601: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/3, changed state to down
SW1 immediately starts announcing itself as the new root bridge.
SW1#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address fa16.3e7c.8ef1
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address fa16.3e7c.8ef1
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi0/1 Desg FWD 4 128.2 Shr
SW3 still has a connection to the real root bridge SW4, and it will ignore the BPDUs sent by SW1 for the duration of the MaxAge timer, until the stored BPDU information expires (20 sec). Then SW3 will start moving Gi0/1 through the listening (15 sec) and learning (15 sec) states to forwarding.
SW3#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 24577
Address fa16.3ed0.04c9
Cost 4
Port 6 (GigabitEthernet1/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address fa16.3ed8.71ca
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi0/1 Desg FWD 4 128.2 Shr
Gi1/1 Root FWD 4 128.6 Shr
SW3#debug spanning-tree events
Spanning Tree event debugging is on
*Oct 15 17:15:33.729: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:15:35.730: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:15:37.734: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:15:39.731: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:15:41.727: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:15:43.730: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:15:45.729: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:15:47.737: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:15:49.739: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:15:51.565: STP: VLAN0001 Gi0/1 -> listening
*Oct 15 17:15:51.741: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:16:06.566: STP: VLAN0001 Gi0/1 -> learning
*Oct 15 17:16:21.567: STP: VLAN0001 Gi0/1 -> forwarding
To eliminate the 20 seconds MaxAge time, the BackboneFast feature must be enabled on all switches.
SWx(config)#spanning-tree backbonefast
SWx#show spanning-tree summary
Switch is in pvst mode
Root bridge for: VLAN0001
Extended system ID is enabled
Portfast Default is disabled
Portfast Edge BPDU Guard Default is disabled
Portfast Edge BPDU Filter Default is disabled
Loopguard Default is disabled
PVST Simulation Default is enabled but inactive in pvst mode
Bridge Assurance is enabled but inactive in pvst mode
EtherChannel misconfig guard is enabled
Configured Pathcost method used is short
UplinkFast is disabled
BackboneFast is enabled
Name Blocking Listening Learning Forwarding STP Active
---------------------- -------- --------- -------- ---------- ----------
VLAN0001 0 0 0 3 3
---------------------- -------- --------- -------- ---------- ----------
1 vlan 0 0 0 3 3
BackboneFast statistics
-----------------------
Number of transition via backboneFast (all VLANs) : 0
Number of inferior BPDUs received (all VLANs) : 0
Number of RLQ request PDUs received (all VLANs) : 0
Number of RLQ response PDUs received (all VLANs) : 0
Number of RLQ request PDUs sent (all VLANs) : 0
Number of RLQ response PDUs sent (all VLANs) : 0
The previous changes have been reverted and the switches are back to their original state. Repeat the process of shutting down the root port Gi0/3 on SW1. Watch the convergence on SW3.
SW1(config)#interface GigabitEthernet0/3
SW1(config-if)#shutdown
SW3#
*Oct 15 17:30:40.720: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:30:40.723: STP: VLAN0001 Gi0/1 -> listening
*Oct 15 17:30:55.724: STP: VLAN0001 Gi0/1 -> learning
*Oct 15 17:31:10.726: STP: VLAN0001 Gi0/1 -> forwarding
As soon as SW3 receives a BPDU from SW1, it transitions the port to the listening state, skipping the MaxAge time.
PortFast
The PortFast feature transitions the port immediately to the forwarding state bypassing the listening and learning states. There are two ways to enable the PortFast feature: globally or per interface. We'll look at both shortly. But first, let's see what normal STP convergence looks like. To do this, enable STP debugging and bring the interface Gi1/3 up.SW1#debug spanning-tree events
SW1(config)#interface GigabitEthernet1/3
SW1(config-if)#no shutdown
*Oct 15 16:01:37.341: set portid: VLAN0001 Gi1/3: new port id 8008
*Oct 15 16:01:37.341: STP: VLAN0001 Gi1/3 -> listening
*Oct 15 16:01:39.187: %LINK-3-UPDOWN: Interface GigabitEthernet1/3, changed state to up
*Oct 15 16:01:40.187: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/3, changed state to up
*Oct 15 16:01:52.341: STP: VLAN0001 Gi1/3 -> learning
*Oct 15 16:02:07.341: STP[1]: Generating TC trap for port GigabitEthernet1/3
*Oct 15 16:02:07.343: STP: VLAN0001 sent Topology Change Notice on Gi1/1
*Oct 15 16:02:07.343: STP: VLAN0001 Gi1/3 -> forwarding
From the time stamps, you can see that it took 30 seconds to go from the listening to forwarding.
Now, enable the PorFast feature on the interface. The IOS issues a warning that enabling the PortFast feature on a wrong interface could cause a temporary loop and points out that PortFast will only work when the interface is in (operational) access mode.
SW1(config)#interface GigabitEthernet1/3
SW1(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 GigabitEthernet1/3 but will only
have effect when the interface is in a non-trunking mode.
Let's verify the interface (operational) mode and the status of PortFast.
SW1(config)#do show interface GigabitEthernet1/3 switchport
Name: Gi1/3
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: static access
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: native
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: none
Note that the administrative mode is dynamic auto and operational mode is static access.
SW1#show spanning-tree interface GigabitEthernet1/3 portfast
VLAN0001 enabled
SW1#show spanning-tree interface GigabitEthernet1/3 detail
Port 8 (GigabitEthernet1/3) of VLAN0001 is designated forwarding
Port path cost 4, Port priority 128, Port Identifier 128.8.
Designated root has priority 32769, address fa16.3e60.caae
Designated bridge has priority 32769, address fa16.3e7c.8ef1
Designated port id is 128.8, designated path cost 4
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
The port is in the portfast edge mode
Link type is shared by default
BPDU: sent 207, received 0
STP debugging is still on. Let's shutdown and no shutdown the Gi1/3 interface.
SW1(config)#interface GigabitEthernet1/3
SW1(config-if)#shutdown
*Oct 15 16:12:45.088: %LINK-5-CHANGED: Interface GigabitEthernet1/3, changed state to administratively down
*Oct 15 16:12:46.088: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/3, changed state to down
SW1(config-if)#no shutdown
*Oct 15 16:13:33.829: set portid: VLAN0001 Gi1/3: new port id 8008
*Oct 15 16:13:33.829: STP: VLAN0001 Gi1/3 ->jump to forwarding from blocking
*Oct 15 16:13:35.675: %LINK-3-UPDOWN: Interface GigabitEthernet1/3, changed state to up
*Oct 15 16:13:36.675: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/3, changed state to up
Note that STP did not generate a topology change notification when the interface went down or came up, and the port was immediately put into forwarding from blocking.
Now, remove the PortFast configuration from the interface.
SW1(config)#interface GigabitEthernet1/3
SW1(config-if)#no spanning-tree portfast
SW1#do show spanning-tree interface GigabitEthernet1/3 portfast
VLAN0001 disabled
Next, enable PortFast globally, which applies it to all ports in access mode. Verify it is enabled on interface GigabitEthernet1/3 again. Shutting down the interface and bringing it back up would generate the same output as before.
SW1(config)#spanning-tree portfast default
%Warning: this command enables portfast by default on all interfaces. You
should now disable portfast explicitly on switched ports leading to hubs,
switches and bridges as they may create temporary bridging loops.
SW1#show spanning-tree interface GigabitEthernet1/3 portfast
VLAN0001 enabled
SW1(config)#do show spanning-tree interface gi1/3 detail
Port 8 (GigabitEthernet1/3) of VLAN0001 is designated forwarding
Port path cost 4, Port priority 128, Port Identifier 128.8.
Designated root has priority 32769, address fa16.3e60.caae
Designated bridge has priority 32769, address fa16.3e7c.8ef1
Designated port id is 128.8, designated path cost 4
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
The port is in the portfast edge mode by default
Link type is shared by default
BPDU: sent 207, received 0
UplinkFast
The UplinkFast feature allows the switch to quickly select a new root port, in case the current one fails. Before enabling the UplinkFast feature, let's see how STP performs by default if the root port goes down.SW1#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address fa16.3e60.caae
Cost 4
Port 6 (GigabitEthernet1/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address fa16.3e7c.8ef1
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi0/1 Desg FWD 4 128.2 Shr
Gi0/2 Desg FWD 4 128.3 Shr
Gi0/3 Desg FWD 4 128.4 Shr
Gi1/0 Desg FWD 4 128.5 Shr
Gi1/1 Root FWD 4 128.6 Shr
Gi1/2 Altn BLK 4 128.7 Shr
SW1(config)#interface GigabitEthernet1/1
SW1(config-if)#shutdown
*Oct 15 16:29:24.406: STP: VLAN0001 new root port Gi1/2, cost 4
*Oct 15 16:29:24.406: STP: VLAN0001 Gi1/2 -> listening
*Oct 15 16:29:26.379: %LINK-5-CHANGED: Interface GigabitEthernet1/1, changed state to administratively down
*Oct 15 16:29:27.379: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to down
*Oct 15 16:29:39.407: STP: VLAN0001 Gi1/2 -> learning
*Oct 15 16:29:54.409: STP: VLAN0001 Gi1/2 -> forwarding
From the time stamps, you can see the convergence took 30 seconds.
Next, revert back the changes (re-enable Gi1/1) and enable UplinkFast.
SW1(config)#interface GigabitEthernet1/1
SW1(config-if)#no shutdown
SW1(config)#spanning-tree uplinkfast
SW1# show spanning-tree summary
Switch is in pvst mode
Root bridge for: none
Extended system ID is enabled
Portfast Default is disabled
Portfast Edge BPDU Guard Default is disabled
Portfast Edge BPDU Filter Default is disabled
Loopguard Default is disabled
PVST Simulation Default is enabled but inactive in pvst mode
Bridge Assurance is enabled but inactive in pvst mode
EtherChannel misconfig guard is enabled
Configured Pathcost method used is short
UplinkFast is enabled
BackboneFast is disabled
Name Blocking Listening Learning Forwarding STP Active
---------------------- -------- --------- -------- ---------- ----------
VLAN0001 5 0 0 3 8
---------------------- -------- --------- -------- ---------- ----------
1 vlan 5 0 0 3 8
Station update rate set to 150 packets/sec.
UplinkFast statistics
-----------------------
Number of transitions via uplinkFast (all VLANs) : 0
Number of proxy multicast addresses transmitted (all VLANs) : 0
SW1#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address fa16.3e60.caae
Cost 3004
Port 6 (GigabitEthernet1/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 49153 (priority 49152 sys-id-ext 1)
Address fa16.3e7c.8ef1
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
------------------- ---- --- --------- -------- --------------------------------
Gi0/1 Desg FWD 3004 128.2 Shr
Gi0/2 Desg FWD 3004 128.3 Shr
Gi0/3 Desg FWD 3004 128.4 Shr
Gi1/0 Desg FWD 3004 128.5 Shr
Gi1/1 Root FWD 3004 128.6 Shr
Gi1/2 Altn BLK 3004 128.7 Shr
Note that when the UplinkFast feature is enaled, the STP priority is increased to 49152 and 3000 is added to the port costs.
Now, let's shutdown Gi1/1 again and watch how fast a new root port is selected.
SW1(config)#interface GigabitEthernet1/1
SW1(config-if)#shutdown
*Oct 15 16:36:18.102: STP: VLAN0001 new root port Gi1/2, cost 3004
*Oct 15 16:36:18.102: %SPANTREE_FAST-7-PORT_FWD_UPLINK: VLAN0001 GigabitEthernet1/2 moved to Forwarding (UplinkFast).
*Oct 15 16:36:20.077: %LINK-5-CHANGED: Interface GigabitEthernet1/1, changed state to administratively down
*Oct 15 16:36:21.077: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to down
The convergence is immediate.
SW1#show spanning-tree summary
Switch is in pvst mode
Root bridge for: none
Extended system ID is enabled
Portfast Default is disabled
Portfast Edge BPDU Guard Default is disabled
Portfast Edge BPDU Filter Default is disabled
Loopguard Default is disabled
PVST Simulation Default is enabled but inactive in pvst mode
Bridge Assurance is enabled but inactive in pvst mode
EtherChannel misconfig guard is enabled
Configured Pathcost method used is short
UplinkFast is enabled
BackboneFast is disabled
Name Blocking Listening Learning Forwarding STP Active
---------------------- -------- --------- -------- ---------- ----------
VLAN0001 4 0 0 3 7
---------------------- -------- --------- -------- ---------- ----------
1 vlan 4 0 0 3 7
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
No dummy multicast packets were sent because there has been no user traffic so the CAM table is not populated.
BackboneFast
The BackboneFast feature can save a switch up to 20 seconds (MaxAge) when it converges from an indirect link failure. To demonstrate this feature, I've simplified the topology to the following. SW4 is the root bridge again.Let's see what happens, when the current root port Gi0/3 on SW1 is shut down.
SW1(config)#interface GigabitEthernet0/3
SW1(config-if)#shutdown
*Oct 15 17:22:22.601: %LINK-5-CHANGED: Interface GigabitEthernet0/3, changed state to administratively down
*Oct 15 17:22:23.601: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/3, changed state to down
SW1 immediately starts announcing itself as the new root bridge.
SW1#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address fa16.3e7c.8ef1
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address fa16.3e7c.8ef1
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi0/1 Desg FWD 4 128.2 Shr
SW3 still has a connection to the real root bridge SW4, and it will ignore the BPDUs sent by SW1 for the duration of the MaxAge timer, until the stored BPDU information expires (20 sec). Then SW3 will start moving Gi0/1 through the listening (15 sec) and learning (15 sec) states to forwarding.
SW3#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 24577
Address fa16.3ed0.04c9
Cost 4
Port 6 (GigabitEthernet1/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address fa16.3ed8.71ca
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi0/1 Desg FWD 4 128.2 Shr
Gi1/1 Root FWD 4 128.6 Shr
SW3#debug spanning-tree events
Spanning Tree event debugging is on
*Oct 15 17:15:33.729: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:15:35.730: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:15:37.734: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:15:39.731: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:15:41.727: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:15:43.730: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:15:45.729: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:15:47.737: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:15:49.739: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:15:51.565: STP: VLAN0001 Gi0/1 -> listening
*Oct 15 17:15:51.741: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:16:06.566: STP: VLAN0001 Gi0/1 -> learning
*Oct 15 17:16:21.567: STP: VLAN0001 Gi0/1 -> forwarding
To eliminate the 20 seconds MaxAge time, the BackboneFast feature must be enabled on all switches.
SWx(config)#spanning-tree backbonefast
SWx#show spanning-tree summary
Switch is in pvst mode
Root bridge for: VLAN0001
Extended system ID is enabled
Portfast Default is disabled
Portfast Edge BPDU Guard Default is disabled
Portfast Edge BPDU Filter Default is disabled
Loopguard Default is disabled
PVST Simulation Default is enabled but inactive in pvst mode
Bridge Assurance is enabled but inactive in pvst mode
EtherChannel misconfig guard is enabled
Configured Pathcost method used is short
UplinkFast is disabled
BackboneFast is enabled
Name Blocking Listening Learning Forwarding STP Active
---------------------- -------- --------- -------- ---------- ----------
VLAN0001 0 0 0 3 3
---------------------- -------- --------- -------- ---------- ----------
1 vlan 0 0 0 3 3
BackboneFast statistics
-----------------------
Number of transition via backboneFast (all VLANs) : 0
Number of inferior BPDUs received (all VLANs) : 0
Number of RLQ request PDUs received (all VLANs) : 0
Number of RLQ response PDUs received (all VLANs) : 0
Number of RLQ request PDUs sent (all VLANs) : 0
Number of RLQ response PDUs sent (all VLANs) : 0
The previous changes have been reverted and the switches are back to their original state. Repeat the process of shutting down the root port Gi0/3 on SW1. Watch the convergence on SW3.
SW1(config)#interface GigabitEthernet0/3
SW1(config-if)#shutdown
SW3#
*Oct 15 17:30:40.720: STP: VLAN0001 heard root 32769-fa16.3e7c.8ef1 on Gi0/1
*Oct 15 17:30:40.723: STP: VLAN0001 Gi0/1 -> listening
*Oct 15 17:30:55.724: STP: VLAN0001 Gi0/1 -> learning
*Oct 15 17:31:10.726: STP: VLAN0001 Gi0/1 -> forwarding
As soon as SW3 receives a BPDU from SW1, it transitions the port to the listening state, skipping the MaxAge time.
Comments
Post a Comment