Spanning-Tree Root Bridge Configuration

Hello Michael

The valid values for bridge priorities in STP are between 0 and 61440. Hpwever, the value must be in increments of 4096. So in practice, the valid values for bridge priorities are: 0, 4096, 8192, 12288, …, up to 61440.

Have you ever wondered why they’re in increments of 4096? It’s not a coincidence that the VLAN ID is a 12-bit value, which can represent up to 4096 VLAN IDs. The reason is because for every VLAN you have a different priority.

In the original 802.1D standard for Spanning Tree Protocol, the 2-byte (16-bit) Priority field in the BPDU is actually divided into two parts: the most significant 4 bits are for the Priority, and the least significant 12 bits are for the VLAN ID. This scheme is used in a variant of STP known as Per-VLAN Spanning Tree Plus (PVST+), which is common on Cisco devices.

This means that the Bridge Priority is effectively a 4-bit value, but it’s still stored in a 16-bit field along with the VLAN ID. Because of this, it can only be incremented in steps of 2^12 (4096), which corresponds to shifting the bits over by 12 places. This is why the valid priorities are multiples of 4096.

So a bridge with a set priority of 12288 that is using VLAN 7 will actually have a priority value in the BPDU field of 12288+7 = 12295. That priority value is unique to VLAN 7 because you can have a root bridge for each individual VLAN, and the priorities must be unique. Does that make sense?

I hope this has been helpful!

Laz