Aligning spanning-tree root with HSRP active?

ams1234

Junior Member
Jul 5, 2015
8
0
0
In this sort of a topology (where we have a L2 etherchannel and VLANs spanning switches) I understand why the spanning-tree root should be aligned with the HSRP active router.

http://www.cisco.com/c/dam/en/us/td.../119819.ps/_jcr_content/renditions/119819.jpg

If however we had VLAN 20 and VLAN 30 not spanning switches, and configured the first multilayer switch to be spanning-tree root for VLAN 20, what happens when to the root bridge when it fails over to the second multilayer switch?

Does the spanning-tree root for VLAN 20 automatically shift? Or would we need something like the spanning-tree vlan 20 secondary command?
 

Pandasaurus

Member
Aug 19, 2012
196
2
76
I am not entirely sure I understand the question you are asking, but I'll try.

If the designated root switch fails, STP will still elect a new root switch based on the configuration of the switches in the tree.

Also, for the record. A trunk port (which is an element of VLAN's) is not the same as an EtherChannel (which is a form of link aggregation). The two terms are frequently interchanged, which causes confusion.
 

ams1234

Junior Member
Jul 5, 2015
8
0
0
I was just wondering what the best way to ensure that the current HSRP root aligned with the spanning-tree root for a certain VLAN was. I mean we could use spanning vlan 20 root secondary however I don't think it works with pre-emption. e.g. if the primary router/multilayer switch failed then came back online, we could use preempt to ensure that it was again the HSRP Active router.
Any ideas for spanning-tree preemption in electing a root bridge? Or would STP recalculation take that into account automatically?

Yes - I'm aware of that. I was thinking of another diagram with an EtherChannel, my mistake.

Thanks.
 

Pandasaurus

Member
Aug 19, 2012
196
2
76
I haven't really done anything with STP (or HSRP, for that matter) since I took my classes a year or two ago, but if I remember correctly... When a new switch joins the tree, STP should re-calculate the tree, at which point the desired switch would become the new root.
 

Gryz

Golden Member
Aug 28, 2010
1,551
204
106
Depending on the brand, type and software-version of your switches, maybe you should check out Shortest Path Bridging (IEEE 802.1aq) or TRILL. Using one of those should solve all your load-balancing problems.