During STP functions, switches use Bridge Protocol Data Units (BPDUs) to share information about themselves and their connections
BPDUs are used to elect the root bridge, root ports, designated ports, and alternate ports
Each BPDU contains a bridge ID (BID) that identifies which switch sent the BPDU
The BID contains:
A priority value
An extended system ID
The MAC address of the switch
The BID is involved in making many of the STP decisions including root bridge and port roles
The lowest BID value is determined by the combination of these three fields