Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Spanning Tree Config Question

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

Re: Spanning Tree Config Question

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

Re: Spanning Tree Config Question

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

Purple

Re: Spanning Tree Config Question

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 .

New Member

Re: Spanning Tree Config Question

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.

Re: Spanning Tree Config Question

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

134
Views
5
Helpful
5
Replies