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

STP Priority Values

dan_track
Level 1
Level 1

Hi

I'm a bit confused on this priority topic. If I set the spanning-tree priority to "1" on one switch and then "4096" on another, I would assume that the switch with the priority of "4096" would become the root bridge. However some people are telling me that the switch with the priority of "1" will win and become the root bridge. Could some one please help clarify this!

Thanks

Dan

6 Replies 6

Edison Ortiz
Hall of Fame
Hall of Fame

Jon Marshall
Hall of Fame
Hall of Fame

Hi Dan

Default STP priority is 32768.

The lower the priority the more likely the switch is to be come the root bridge. However you normally have to do STP in incerments of 4096 so you would not be able to allocate a priority of 1 to a switch.

HTH

Jon

You sure can,

Rack1SW1(config)#spanning-tree vlan 1 priority 1

Rack1SW1(config)#end

Rack1SW1#

*Mar 1 00:16:45.883: %SYS-5-CONFIG_I: Configured from console by console

Rack1SW1#sh run | i spannin

spanning-tree vlan 1 priority 1

Rack1SW1#sh spanning

Bridge Identifier has priority 1, address cc06.1794.0000

Edit: That's Dynamips which runs CST, sorry about that.

Test with real switches & PVST:

Rack1SW1(config)#spanning-tree vlan 1 priority 1

% Bridge Priority must be in increments of 4096.

% Allowed values are:

0 4096 8192 12288 16384 20480 24576 28672

32768 36864 40960 45056 49152 53248 57344 61440

Rack1SW1(config)#spanning-tree vlan 1 priority 0

Rack1SW1(config)#do show run | i spanning

spanning-tree mode pvst

spanning-tree extend system-id

spanning-tree vlan 1 priority 0

Hi

Thanks for the replies.

Now that's what I thought. So is this an absolute, that you can't assign a switch a priority of "1" or is this just accepted practice where in reality a priority of "1" will take precendence over a value of "4096" thus making the switch with a value of "1" the root switch?

Any comments appreciated.

Thanks

Dan

A priority of '0' will take precedence over '4096'.

Priority of '1' does not work in PVST (Per-Vlan Spanning-Tree) mode but as you can see from my post, it does work in CST (Common Spanning-Tree) mode

Whether you can enter 1 or not depends on whether extended sysid feature is enabled. In a nutshell, the extended sysid feature steals 12 bits of the priority to store the vlan id in the bridge ID. This way, all the different spanning tree instances on the different vlans have a different bridge ID, even if they share the same mac address (the bridge ID is priority + bridge mac address). Without extended sysid, one different mac address is used for each and every vlan, which is too expensive (just like IP addresses, the number of mac addresses in the world is also limited).

The reason why the lower is the better for STP is probably because it's the way a the cost works: cost 10 is better than cost 100 (meaning that you are closer to the root). So by using consistently the convention "lower is better", the fields of a bpdu (root ID, cost, sender bridge ID and port ID) can be interpreted as a very long integer. There is no need to extract the different fields in the BPDU to compare it to another one... you can compare all the fields bit by bit.

HTH,

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:

Review Cisco Networking products for a $25 gift card