In redundant L2 topology STP ensures loop free path for frames traveling among endpoints blocking redundant paths that cause a loop.
STP – spanning tree protocol uses STA (spanning tree algorithm). STA designates a single switch as root bridge and uses it as reference for all calculations. Switch with lowest bridge ID (BID) becomes root bridge. After root bridge is determined – STA calculates shortest path to root bridge. Each switch use STA determine which ports block. Until STA on all switches is calculated – all traffic on broadcast domain is blocked. Port costs and path to rood bridge are considered when determining which path to leave unblocked.
This article will focus on root bridge election in STP enabled network.
When root bride are elected this mechanism will be used:
1) lover priority – configured by spaning-tree vlan nr,nr, … priority nr (1 to 65 536 with increment 4096, default 32 768) is better
2) if priorities are equal (default 32 768) then lower MAC address is preferred by STA.
Our lab will use these 2 mechanism for root bridge election:
For configuration root bridge priority in 802.1D(W) on STP capable switches can be used CLI command:
sw(config)#spanning-tree vlan number priority Priority_number
example spanning-tree vlan 1,99,150 priority 4096
sw(config)# spanning-tree vlan nr root primary
sw(config)# spanning-tree vlan nr root secondary
One of the most important thing is determine which switch is elected as root bridge using CLI commands. You can use show spanning-tree entered at privileged exec prompt as show next picture
What important thing show to us output from commands executed on two different switches?
1) Root bridge mark themselves as root bridge (this bridge is …)
2) All root bridge ports are in designated role and are in forwarding state
3) 802.1D implementation of STP is in use (not rapid-PVST) because ieee is in output
4) Priority 4096 was important for root bridge selection (if equal then lover MAC break the tie and S-1 going to be root bridge
Our preconfigured training topology can be obtained from here (PKT 5.2 or above required).