cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
308
Views
5
Helpful
5
Replies

Spanning Tree Config Question

schadmin
Level 1
Level 1

What is the difference between using the following 2 command to gaurentee a certain switch as the root switch? Can I use either one? Is one way more beneficial than the other?

1) spanning-tree vlan 2 priority 8192

2) spanning-tree vlan 2 root primary

5 Replies 5

ankurbhasin
Level 9
Level 9

Hi Friend,

I will recommend to be on safer side use priority 8192 command to be 100% sure it becoems the root.

What happens sometime that when you use root primary command the spanning-tree root primary command alters this switch's bridge priority to 8,192.

If you hit enter after spanning-tree root primary command and the switch does not become root, then the bridge priority is changed to 100 less than the bridge priority of the current bridge. If the switch does not become root, an error results.

Read this for more details

http://www.cisco.com/univercd/cc/td/doc/product/software/ios123/123cgcr/swtch_r/swi_s6.htm#wp1074399

HTH

Ankur

Sorry, but I would recommend the opposite. If you set the bridge priority to 8192, and the current root is already, say 8000, then this switch will not become root. But if you use the "root primary" command, then it will set the priority to 7900 and this switch will become root. That is, directly setting the priority does not take account of what is already happening elsewhere in the network.

I puzzled a bit about the paragraph you quoted from the documentation, and it is not very clear. But the way I read it is:

"If you hit enter after spanning-tree root primary command and the switch does not become root, then the bridge priority is changed to 100 less than the bridge priority of the current root bridge. If the switch does not become rootfor example if the current root bridge already has a priority less than 100, an error results."

Can anyone confirm that behaviour?

Kevin Dorrell

Luxembourg

glen.grant
VIP Alumni
VIP Alumni

It is 2 different commands to do the same function , if you use the root command the switch automatically assigns a priority of 8192 also .

dwulff
Level 1
Level 1

By using the root syntax you're setting the election. the syntax also allows you to configure a secondary on another switch. It's easier to work with primary and secondary root bridges then with a lot of diferent prio's.

But if you want your to set it up really granular, you could configure switch1 with 8192 switch 2 with 8092 , 3 with 7992 etc... That way half of your equipment could be down and makes it possible for you to control the switch entitled to be root bridge.

If it is usefull to make it this granular is another discusion, since, if half your equipment is down, you have other worries.

Francois Tallet
Level 7
Level 7

There is more to the "root primary" command that just setting the priority. The root command is in fact a macro that configures the priority but also the spanning-tree timers (by macro I mean that this command is in fact expanded into several different configuration lines, one of them being the stp priority. The macro is not showing up in the configuration). This is particularly interesting if you want to adjust your timers based on the diameter of your network in PVST mode.

If it's just a matter of configuring the root bridge, I don't really get the point of using this macro. Configuring a bridge as root can be done in a trivial way with the priority command.

Personally, I don't like the switch to pick up a priority for me and I prefer choosing the value myself with the priority command. At least, I know what is happening... but that's a matter of taste at that stage.

Just be aware that if you use the "root primary" command, you will have your timers also set to their default values.

Regards,

Francois

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: