A bridge identifier (BID) is a 64-bit value that uniquely identifies a switch within a spanning-tree instance. Switches advertise their BIDs in Bridge Protocol Data Units (BPDUs), allowing STP to elect a root bridge and build a loop-free topology. section 14.3.1 section 14.6
The BID contains two main fields:
- A 16-bit bridge priority, made from a configurable priority value and the Extended System ID. section 14.3.1
- A 48-bit MAC address that distinguishes switches with otherwise equal priority. section 14.3.1
- In Cisco STP, the Extended System ID equals the VLAN ID, so VLAN 1 adds 1 to the default priority of 32768, producing 32769. section 14.3.1
STP elects the switch with the numerically lowest BID as the root bridge. A newly booted switch initially declares itself root, then accepts a switch advertising a lower BID. Because Cisco PVST+ creates a separate spanning tree for each VLAN, the root bridge can differ between VLANs. section 14.6 section 14.3.1
Choosing and verifying a root bridge
Configure a lower priority on SW3 with `spanning-tree vlan 1 priority 24576`. VLAN 1 adds 1, giving SW3 a BID priority of 24577. Use `show spanning-tree` to compare the root BID and local BID. Priority values must use increments of 4096; a value such as 20000 is rejected. In a sample topology, SW3 becomes root with the lowest BID, while SW4, configured at 28672, becomes the next candidate if SW3 fails.
The BID also participates in later STP decisions. After root costs are compared, switches use the neighbor’s BID to break root-port ties; during designated-port selection, the switch with the lower BID wins when root costs match. RSTP uses the same BID-based topology algorithm. section 14.3.2 section 14.3.3
