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.
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.
stp.bmp 1.6 MB
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.
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").
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.
BridgeID_calculator.xls 70.0 K
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.