Root Bridge Election
- The switch with the lowest Bridge ID (the least Priority or Lowest MAC address) wins the election and becomes the Root Bridge for the STP topology.
- Initially, each switch begins its STP logic by creating and sending a Hello BPDU message, in which it claims to be the Root Bridge (because priority is by default the same for every switch, and it is unaware of the other switch’s Base MAC).
- If a switch receives a superior Hello BPDU message on any of its ports, it stops claiming to be the Root Bridge and stops sending Hello BPDUs. Ultimately, the switch with the lowest Bridge ID stops sending Hello BPDUs and wins the election process.
Manually configuring the priority of a switch: –
R1(config)#spanning-tree vlan <vlan-id> priority <priority-value>
Spanning Tree Protocol in CCNA
Spanning Tree Protocol (STP) is a protocol that prevents Layer 2 loops or Bridging loops by computing a tree structure of nodes in a network. It also prevents MAC Flapping (an event that occurs when a switch receives packets on different interfaces with the same source MAC address)