Spanning tree Priority

Unanswered Question
May 3rd, 2012


Recently we will add 2 new core Switch 3750X, these 2 equipments will manage the spanning tree ( root)

my idea is to change the priority in order to make 1 or the 2 of them the root, my question is  if i setup the same priority for both when one go down the other will assume the role of root in the spanning tree topology ?


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Nathan Spitzer Thu, 05/03/2012 - 09:27

Do it the easy way (TM) "Spanning-tree  vlan root primary " on the primary and "Spanning-tree  vlan root secondary" on the secondary. These are macros for the priority command but make it easy.

If they both have the same priority then one isn't primary :-). These commands ensure that the one you want primary is primary as long as it is up. If it dies then the other will become primary.

Also make sure you are using rapid spanning-tree to minimize downtime when the root switches.

John Blakley Thu, 05/03/2012 - 09:25

If you set the priority's as the same, you're going to still go into the standard elections of bridge-id etc. Your better bet is to set one as the primary and the other as the secondary:

Switch 1:

spanning-tree vlan 1 root primary

Switch 2:

spanning-tree vlan 1 root secondary

You'll want to specify the vlans that you have or which you want to use as the primary. If you have vlans 1-10 and you want to load balance, you could do something like:


spanning-tree vlan 1-5 root primary

spanning-tree vlan 5-10 root secondary


spanning-tree vlan 5-10 root primary

spanning-tree vlan 1-5 root secondary



lcarbajalparedes Thu, 05/03/2012 - 09:41

Hello, thank you for your reply i attached an image of the scenario that i will have

The idea its to connect both switch 3750X as a stack switch make one of them the primary for Spanning tree and control de internal routing ( ip routing ) , for each server and access switch i plan to use all least 2 interfaces ( port-channel) ,

If use for example this


spanning-tree vlan 1-5 root primary

spanning-tree vlan 5-10 root secondary


spanning-tree vlan 5-10 root primary

spanning-tree vlan 1-5 root secondary

what version is the most adecuate for the spanning tree, unfortunately not all my equipments will be cisco ( cisco + HP )

i dont know if it will be correct to use RPVST for all of them?

Will have an advice about the internal routing to the edge network?


Reza Sharifi Thu, 05/03/2012 - 10:05


If you are planning to stack the 3750s, than they logically become one switch and one config.  What ever config you apply to the master, it will sync to the member.  It is good idea to stack them and have a portchannel from every access switch connecting to both 3750s. Is this case, just make the stack the root bridge using lower priority.


John Blakley Thu, 05/03/2012 - 10:07


I'm not sure about HP. I know Dells support RSTP, STP, and MST. I'm a Cisco/Dell shop, so we use PVST but I'm about to convert to MST. You could use RPVST, but keep in mind that if the HP doesn't support the Cisco version (per vlan), everything will dump into vlan 1 usually. This means that if you have any links that go to your HPs that don't have vlan 1 on them (you changed the default native, or just don't use vlan 1), the HP could end up thinking that it's the root of the STP topology. I had this happen with a Dell, and interestingly enough it didn't kill my network because it was the only switch on a different native vlan. I added vlan 1 to it's trunk port and didn't make it native and it fixed the issue. Vlan 1 wasn't even enabled on the port specifically, but it was the way that the Dell/Cisco spoke to each other because of the CST (Common Spanning-Tree).

So, you should be okay since RPVST is backward-compatible with STP, but just keep the above point in mind. HP may surprise you and support all flavors of Cisco, but I don't know for sure.



lcarbajalparedes Thu, 05/03/2012 - 10:22

Thank you for you help ,

In case the RPVST doesnt work with the HP, what will be the options for this as i choose the stack switch as the root for the spanning tree, can i use the normal version of spanning tree for or my vlans?

About the Core sw 3750X i will also use a separate VLAN for the management and others for the services ( users, servers, etc)

My core Sw 3750X will manage  the VTP for all the switches ( master VTP for the core , client VTP for the acess switch)

Any advice about this?

thank you

Sergey Fer Thu, 05/03/2012 - 10:25

Standard-based forms of spanning-tree are STP (802.1d). RSTP (802.1w) and MST (802.1s). Cisco supports PVST which is compatible with STP, RPVST, which is compatible with RSTP, and MSTP, which is MST itself. So if you have heterogenous network it is better not to use "compatible" protocol but use standards in ther native format. Use MST if HP supports it.

MSTP on Cisco has another syntax then PVST, so you need to create MST instances, assign VLAN to instances, set up priorities etc. In any cases spanning-tree vlan <...> root primary | secondary command is a macro, that is converted into standard for of spanning-tree vlan <...> priority <...>, where priority will be a bit less than a priority of a current root. You may enter the command root primary, check your config and wonder There will be nothing about roots but only priorities. So standard STP root election procedure will take place in any cases. I prefer not to use root word and use precise priority instead.

If you have possibility to stack 3750x - it is the best way to do. EtherChannel is much better than any form of STP.

lcarbajalparedes Thu, 05/03/2012 - 10:35


I checked you advice about use the MST; i would like to use a simple spanning tree, at the moment I use a MST for another network and its a little tricky. Is there other option for the spanning tree in the scenario that i describe?


John Blakley Thu, 05/03/2012 - 10:37

Aside from using MST, the only other option that I see would be to run RPVST on your Cisco gear and then run RSTP on the HPs. STP will still run with the non-Cisco switches and you should have no worries.

Sergey Fer Thu, 05/03/2012 - 10:48

Well, it's your choice... Consider that PVST and RPVST are compatible with STP and RSTP but are not the same. So by simplifying protocols you may get very complex trouble. Compatibility indeed means that in VLAN 1 that protocols will behave absolutely the same way as standard protocol will. And nothing else. Cisco by means of per-VLAN protocols creates it's own STP in every VLAN you have on a switch. And what HP does? If you know and understand it - great. I do not. Not because of HP is bad... Simply personally I do not know

So then you may try to avoid STP at all. Stack 3750s, use L3 interfaces, EtherChannels etc. As I can see you topology allows you to do it.

lcarbajalparedes Thu, 05/03/2012 - 10:55

Hello, thank for your advice, as my network it is not very complex and big i would not like to use some thing complex for the spanning tree,

In the case I use MST  for the spanning tree, what would be the best way to implement this in my network?

About the HP it will be the model 2620- 24 ports PoE


Sergey Fer Thu, 05/03/2012 - 11:22

By stacking 3750s you will avoid any loops in your existing network. Therefore your xSTP protocol will have the only task - to control your network. It will not block any link until something goes wrong or until you or somebody else create a loop. So in my opinion the best things to do are:

- create a stack

- connect each access layer switch by means of Etherchannel to the stack

- if you do not need to span your VLANs across network use L3 interfaces, if you need than

     - use MST

     - use default instance 0 for all VLANs

     - assign priority 0 to stack and therefore make it a root in instance 0.

MST instance 0 is standard itself and is compatible with all other standards, so your switches would work correctly.

Nathan Spitzer Thu, 05/03/2012 - 11:02

Personaly, I dont allow Cisco and non-Cisco devices to exist on the same L2 network. I have been burnt too many times. 

MST is an over-complicated biatch to configure, especially considering the problem it was meant to solve (minimizing CPU/memory requirements for multi-VLAN networks) is no longer relevent.

I use L3 links to connect Cisco and non-cisco devices together at L3 instead of L2. Simple, effective, and no possibility of issues caused by subtle spanning-tree issues between vendors.

lcarbajalparedes Thu, 05/03/2012 - 11:10

About the using L2 or L3 unfortunately i think that series (HP) only support L2  not L3, thats why i was looking options for the spanning tree.



This Discussion

Related Content