STP Root Bridge selection

When Spanning Tree Protocol (STP) is enabled, all switches in a topology will send a special frame to each other called a BPDU (Bridge Protocol Data Unit). In this BPDU, there are two pieces of information that spanning-tree requires:


The MAC address and the priority together make up the bridge ID. The BPDU is sent between switches as shown in the following picture:

switches send bpdu

Spanning-tree requires the bridge ID in order to determine which switch will become the root bridge.

  • The root bridge is the switch that has the best “bridge ID”.
  • The switch with the lowest bridge ID is the best one.
  • By default, the priority is 32768, but we can change this value if we want.

So who will become the root bridge? In our example, SW1 will become the root bridge!


Priority and MAC address make up the bridge ID. Since the priority is the same on all switches, it will be the MAC address that is the tiebreaker. SW1 has the lowest MAC address thus the best bridge ID and will become the root bridge.

What do we mean when we say "lowest MAC address?"  Remember that MAC addresses are essentially numbers. By convention, MAC addresses are written in Hexidecimal. Computers and network devices actually read MAC addresses as binary. We can even write out a MAC address in decimal format, although we never do that because it has no use to us.

So a MAC address of 00:00:00:00:00:01, if simply viewed as a number, is smaller than 00:00:00:00:00:02. Similarly AB:00:00:00:00:00 is smaller than AC:00:00:00:00:00. Some more examples:

  • AB:CD:EF:12:34:56 is larger than AB:CD:EF:12:34:11
  • 00:00:00:55:55:55 is larger than 00:00:00:44:55:55
  • FF:FF:FF:FF:FF:FF is larger than 00:00:00:00:00:00