Spanning Tree Root Port Election: How does it work?
We said that non-tooy ridges have one Root Port. But how is it chosen?
The Root Port is elected by the following criteria:
- the port that receives the superior BPDU
- the port with the lowest Root Path Cost
- the port that received the BPDU containing the lowest sender’s Bridge ID
- the port that receives the BPDU with the lowest sender’s port ID
To understand this, here is a simple two-switch setup:
Both switches announce themselves as a root bridge. Then switch B receives a superior BPDU on both its interfaces.
- both ports on switch B receive a same superior BPDU –> tie
- since both ports received the same superior BPDU, there is a same Root Path Cost –> tie
- both interfaces connect directly to the root bridge. So they receive BPDU frames with a same Bridge ID –> tie
- the last chance is to verify which is interface receives a BPDU with the lowest sender’s port ID. Fa0/1 receives a BPDU with Port ID of 32769. Fa0/2 receives a BPDU with Port ID of 32770.
The Port ID in the BPDU received by Fa0/1 is the lowest, so Fa0/1 becomes the Root Port (in the Forwarding state) and Fa0/2 is put in the Blocking state. Notice the amber color: