How to change Spanning Tree Bridge Root Priority value and What is Extended System ID
Every Bridge (Switch) Participating in a Spanning Tree Protocol network is assigned with a numerical value called Bridge Priority (Switch Priority) Value.
By default, all Cisco Switches has a Bridge Priority (Switch Priority) value of 32,768. Bridge Priority (Switch Priority) value decides which Switch can become Root Bridge (Root Switch).
You can lower the the Switch Priority value in a Spaning Tree Protocol switch, so that we can make that switch elected as the Root Switch.
To change the Bridge Priority (Switch Priority) Value, to a particular value, use the following command from Global Configuration mode.
When you change the Bridge Priority (Switch Priority) Value, make sure that you are decrementing or incrementing it by 4096. If you try to decrement or increment the Bridge Priority (Switch Priority) Value by any value other than 4096, you will get an error message similar to below output.
omnisecu.com.SW1>enable omnisecu.com.SW1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. omnisecu.com.SW1(config)#spanning-tree vlan 170 priority 32767 % 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 omnisecu.com.SW1(config)#exit omnisecu.com.SW1#
This is because, by default, Cisco Switches are running a mode of Spanning Tree Protocol, known as Per-VLAN Spanning Tree Protocol + (PVST+). PVST+ is based on the IEEE 802.1D standard, added with Cisco proprietary extensions. The PVST+ runs on each VLAN on the switch, which means that there is a separate Spanning Tree Protocol instance for each VLAN.
The 16-bit Bridge Priority (Switch Priority) Value included in the BPDU's must hold both the Bridge Priority (Switch Priority) Value and the VLAN information, as shown below. The VLAN information is added as 12-bit Extended System ID as shown below.
From above image, we can see that Bridge Priority (Switch Priority) Value is represented only by using the left most four bits and the remaining 12 bits are used to represent Extended System ID. If we want to change the Bridge Priority (Switch Priority) Value, the least change is possible only from the 13th bit, which is 2^12.
So what is Spanning Tree Extended System ID? The Extended System ID is utilized by spanning-tree to include the VLAN ID information inside 16-bit STP Bridge Priority value. Extended System ID is the least significant 12-bits in 16-bit STP Bridge Priority value.
Hence the Bridge Priority (Switch Priority) Value 32769 from the output of show command "show spanning-tree" is the sum of default Bridge Priority (Switch Priority) Value 32768 and the VLAN number, 1 (above example, I have only one VLAN).
Use "spanning-tree vlan <vlan_no> priority <priority_no>" command to change the Bridge Priority (Switch Priority) Value, from Global Configuration mode.
omnisecu.com.SW1>enable omnisecu.com.SW1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. omnisecu.com.SW1(config)#spanning-tree vlan 1 priority 28672 omnisecu.com.SW1(config)#exit omnisecu.com.SW1#