Category Archives: STP

Spanning Tree Feature for Optimization

Spanning Tree Feature for Optimization

Left to default settings, IEEE 802.1d STP works, but convergence might take up to a minute or more for the entire network. For instance, when the root fails, a switch must wait on the 20 second Maxage timer to expire. Then, newly forwarding ports spend 15 seconds each in listening and learning states, which makes convergence, take 50 seconds for that one switch. Over the years, Cisco added features to its STP code, and later the IEEE made improvements as well. This section covers the key optimizations to STP.

STPviva4341.jpg

Backbonefast:
brk-135-tccnaswitching-22-638

Uplinkfast:
brk-135-tccnaswitching-21-638.jpg

Convergence Time:
2-ccna-switching-11-638.jpg

Reference:
http://cisco-shais.blogspot.com/2011/02/optimizing-stp.html

Advertisements

STP | Cost and Port Priority

1. Election BID (Bridge Priority & Bridge Mac).
2. Find the best path to the root.
– Lowest Cost
– Lowest BID
– Lowest Port No.
3. Block whatever is left over.

STP1

SW2
Interface Role Sts Cost Prio.Nbr Type
——————- —- — ——— ——– ——————————–
Gi1/48 Root FWD 4 128.33 P2p
Gi1/47 Altn BLK 4 128.34 P2p

By default STP uses the lowest port no. received from the the Upstream BPDU. In this case port g1/47 is the lowest port on RB so neighbor switch will select this as forwarding and blocked the other one.

SelectinglinkSTP
In the case we need to use the other link instead of the elected one, We can tweak the below:
1. Interface cost of the neighbor switch. From cost of 4 we will change the forwarding port to higher and turn to blocking.
SW02#Interface G0/48
#spanning-tree cost 10

Verification: #Show spanning-tree
SW2
Interface Role Sts Cost Prio.Nbr Type
——————- —- — ——— ——– ——————————–
Gi1/47 Root FWD 4 128.48 P2p
Gi1/48 Altn BLK 10 128.47 P2p

2. The port priority from RB/Upstream.
Sw01#Interface G0/47
#spanning-tree port-priority 16

Now let’s verify on SW02 to see the current blocking.

SW02# show spanning-tree
Interface Role Sts Cost Prio.Nbr Type
——————- —- — ——— ——– ——————————–
Gi0/47 Root FWD 4 128.48 P2p
Gi0/48 Altn BLK 4 128.47 P2p

Based on the output Port Priority did not change. But, Let’s verify the received priority.

SW02#sh spanning-tree vlan 1 interface g0/47 detail
Port 48 (GigabitEthernet0/47) of VLAN0001 is alternate blocking
Port path cost 4, Port priority 128, Port Identifier 128.34. <-Local Settings
Designated root has priority 24577, address 6416.8d2d.6680<-From Upstream
Designated bridge has priority 24577, address 6416.8d2d.6680
Designated port id is 16.90, designated path cost 0

Timers: message age 1, forward delay 0, hold 0
Number of transitions to forwarding state: 2
Link type is point-to-point by default
BPDU: sent 4, received 1176

SW02#sh spanning-tree vlan 1 interface g0/48 detail
Port 48 (GigabitEthernet0/48) of VLAN0001 is root forwarding
Port path cost 4, Port priority 128, Port Identifier 128.33.
Designated root has priority 24577, address 6416.8d2d.6680
Designated bridge has priority 24577, address 6416.8d2d.6680
Designated port id is 128.89, designated path cost 0

Timers: message age 1, forward delay 0, hold 0
Number of transitions to forwarding state: 2
Link type is point-to-point by default
BPDU: sent 2, received 1174

Note: Port priority only considered when comparing received BPDUs, so it has to be configured on the upstream switch to take effect. If you change port priority on your root switch, then you’ll get the desired effect.

Reference:
http://www.astorinonetworks.com/2011/06/30/spanning-tree-port-priority/

What is Spanning Tree

Spanning-Tree Summary

STP1st

STP History:
– Radia Perlman who develop the Spanning Tree Protocol in mid 80s while working at DEC.
– Institute of Electrical and Electronics Engineering (IEEE), 1990 they develop the standard of 802.1D

Issue w/out STP:
stpisszzue
Time-to-Live (TTL) – A value in an IP packet’s header that is decremented by on each time the packet enters a router interface.

Broadcast Storm – A broadcast frame (i.e. a frame destined for ffff.ffff.ffff) circulates endlessly around a layer 2 topology, because the frame has no TTL field.

STP Port State:
STPmodess

STP Cost:
STP Cost

1. Election BID (Bridge Priority & Bridge Mac).
2. Find the best path to the root.
– Lowest Cost
– Lowest BID
– Lowest Port No (Tie Breaker).
3. Block whatever is left over.

STPbestpath.JPG