1 2 Previous Next 15 Replies Latest reply: Aug 25, 2015 12:17 AM by Dipak Singh RSS

    STP - Default Priority Values


      Hey everyone,


      I have a question that nobody seems to be able ot answer for me.


      I have always accepted that the defualt priority value of STP (802.1d) is 32768 (32768 + sys-id-ext x) as show in "show spanning-tree" below -


      SW3#show spanning-tree
        Spanning tree enabled protocol ieee
        Root ID    Priority    24577
                   Address     00D0.D3E6.9838
                   Cost        19
                   Port        1(FastEthernet0/1)
                   Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec


        Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
                   Address     00D0.BCB5.B556
                   Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
                   Aging Time  20


      Interface        Role Sts Cost      Prio.Nbr Type
      ---------------- ---- --- --------- -------- --------------------------------
      Fa0/8            Desg FWD 19        128.8    P2p
      Fa0/1            Root FWD 19        128.1    P2p
      Fa0/24           Altn BLK 19        128.24   P2p





      Now, when I want to configure priority I don't undertand WHY the priority must be in increments of 4096 ?

      Is there a specific reason for the default value of both of these numbers?


      SW3(config)#spanning-tree vlan 1 priority ?
        <0-61440>  bridge priority in increments of 4096
      SW3(config)#spanning-tree vlan 1 priority







        • 1. Re: STP - Default Priority Values

          Hi Shane,


          When using the extend system-id the STP BPDU has to reuse 4 bits from the original 16 bits used to denote the Switches Priority.  Therefore,  2 to the 4 equals 16, so 16 increments from 0-61440, with 32,768 chosen as the mid-range value.


          16 increments of 4096 start at 0---4096---8192---12288---16384---20480---24576---28672---32768---etc.


          STP BID Fields: 4 bits Priority --- 12 bits Vlan ID or Extended System ID ---48 bit MAC address from Backplane or Supervisor dependent on chassis.



          • 2. Re: STP - Default Priority Values

            Hi Shane,


            The bridge priority is a customizable value that you can use to influence which switch becomes the root bridge. The switch with the lowest priority, which means lowest BID, becomes the root bridge (the lower the priority value, the higher the priority). The default value for the priority of all Cisco switches is 32768. The priority range is between 1 and 65536; therefore, 1 is the highest priority.



            Now have a look at this diagram :



            The early implementation of STP was designed for networks that did not use VLANs. There was a single common spanning tree across all switches. When VLANs started became common for network infrastructure segmentation, STP was enhanced to include support for VLANs. As a result, the extended system ID field contains the ID of the VLAN with which the BPDU is associated.




            When the extended system ID is used, it changes the number of bits available for the bridge priority value, so the increment for the bridge priority value changes from 1 to 4096. Therefore, bridge priority values can only be multiples of 4096.



            Note that 2 raise to power 12 is 4096. Now if you occupy even a single bit ( out of the 4 bits) for the Bridge Priority,


            It means 4096*2=8192 (multiple of 4096..)



            The extended system ID value is added to the bridge priority value in the BID to identify the priority and VLAN of the BPDU frame.

            • 3. Re: STP - Default Priority Values

              Lets take 4 bits of bridge priority.


              0000 means 4096 (See the logic in my previous post)

              0001 means 8192

              0010 means 12288

              0011 means 16384

              0100 means 20480

              0101 means 24576

              0110 means 28672

              0111 means 32768 (DEFAULT)

              1000 means 36864

              1001 means 40960

              1010 means 45056

              1011 means 49152

              1100 means 53248

              1101 means 57344

              1110 means 61440

              1111 means 65536 (Not Allowed)


              Because ultimately this priority has to be added to the vlan number (extended system-id) to make final STP priority. So if we take 65536, then the minimum net priority will be 65536 + 1 = 65537 which cannot be fit in a 2-byte space.




              • 4. Re: STP - Default Priority Values

                Hi Chetan,


                Nice to have you back constructing informative posts!  You're logic concerning the bit-Priority relationship is spot-on.  The first value (0000), as you stated, cannot be used.  Also, no value below 4096 can be used either, hence--zero and one are not valid.



                • 5. Re: STP - Default Priority Values

                  Hi Chris,


                  It is great to see your continued and valuable contribution to the CLN.


                  Always much informative..


                  BTW, I completely agree with the point you made in above post..

                  • 6. Re: STP - Default Priority Values

                    The bit value (0000) means 0, which is invalid to use as an STP Priority; the last value (1111) means 61440.

                    • 7. Re: STP - Default Priority Values

                      Sir, please have a look at the following diagram..




                      So I guess, the valid values will be from 0 to 61440 for the bridge priority..

                      • 8. Re: STP - Default Priority Values


                        The following command also verifies this :




                        Switch(config)#spanning-tree vlan 1 priority ?


                        <0-61440>  bridge priority in increments of 4096

                        • 9. Re: STP - Default Priority Values

                          And that is why we should always verify.  Once again I'm misguided.  I was spewing off the top-of-my-head without verifying the logic, in other words---I assumed!

                          I love being corrected, as it helps me to learn and know the correct answer----which is what you just proved!!!


                          Thanks, Chetan

                          • 10. Re: STP - Default Priority Values



                            please also see the PM..

                            • 11. Re: STP - Default Priority Values
                              Leo Pastor

                              Well, all posts point to multiplications and powers, but we could really think of it as having to do with divisions.


                              When multiple instances of VLANs came to the scenes, we needed to differentiate what VLAN a certain BPDU is related with. The solution was a modifications he to the original scheme, which used 16 bits for the priority. We "borrowed" 12 bits for the VLAN identification, so just 4 bits remained to be used to indicate the priority, opposed to the original 16 bits.


                              If we divide 65536 (yes, 2 raised to 16) by 16 (2 raised to 4, we only have 4 bits now), you end up with 4096! That means for each number we insert in those 4 bits, in fact they are to be multiplied by 4096 to get the "real amount".


                              It is kind of compressing the priorities, just using a subset of them because now we can´t be as granular as before (we had 16 bits in the past).


                              Now, the valid values are from 0 to 61440, and they are 0 * 4096 to 15 * 4096 (even when interface shows priority "1").




                              • 12. Re: STP - Default Priority Values

                                original deleted due to wrong file format of my attachment.  Sorry

                                • 13. Re: STP - Default Priority Values

                                  In regards to Chetan's post #3,


                                  Your table is incorrect.  The 4-bits you are referring to are the upper 4-bits of the 16-bit field.  The upper 4-bits are a multiplier, used to calculate the bridge priority. I have attached a little calculator you can use to help illustrate the process.  The correct table is below.

                                  0000 = 0
                                  0001 = 4096
                                  0010 = 8192
                                  0011 = 12288
                                  0100 = 16384
                                  0101 = 20480
                                  0110 = 24576
                                  0111 = 28672
                                  1000 = 32768 default
                                  1001 = 36864
                                  1010 = 40960
                                  1011 = 45056
                                  1100 = 49152
                                  1101 = 53248
                                  1110 = 57344
                                  1111 = 61440


                                  When using the 802.1t Extended System ID Method (4-bit multiplier + VLAN ID + MAC address) to determine the Bridge ID the allowed values for the bridge priority are 0 - 61,440.


                                  When using the 802.1d Traditional Method (16-bit priority value + MAC address) to determine the Bridge ID the allowed values for the bridge priority are 0 - 65,535. 

                                  • 14. Re: STP - Default Priority Values

                                    In response to Chris's posts #4 and #6,


                                    You can configure the bridge priority under STP to zero.  This is a valid option (0 - 61440 for Extended System ID) and (0 - 65535 for traditional method).


                                    Lets ignore the MAC for the moment, if I configured the following:


                                    spanning-tree vlan 100 priority 0


                                    What would my Bridge priority be?


                                    The correct answer is 100.  Therefore the lowest Bridge priority you will ever see on a switch is 1.


                                    spanning-tree vlan 1 priority 0


                                    Bridge priority is 1.




                                    1 2 Previous Next