Spanning tree – port roles and status during root bridge election

spanning tree

Regarding my studies I would like to confirm the three statements below about spanning tree.

  1. When a switch boot or spanning tree is enabled on a switch, the switch ports pass into blocking state 20 seconds before going into listening state (I read it on Internet but not the case after testing it on Cisco packet tracer)
  2. The root bridge election and the root designated port are chosen during the listening state
  3. We could consider that the root bridge election and the root designated port selection is done after the listening state (15 seconds default).

Best Answer

Note: this is for standard STP/PVST not RSTP/PVRSTP

When the switch boots, if it is not connected to any other switches it will consider itself the root and all ports are Designated. Their state should now move to Forwarding (if they are up, connected to non-STP device). The switch moves the ports immediately into the Listening state for 15 seconds and then Learning state for 15 seconds, before moving to Forwarding. If when the switch boots it receives a superior BPDU and considers another switch root, the port may stay Blocking, or may transition to Forwarding (same process 15/15) if it is a Root port.

The switch always receives and processes BPDUs in any port state (apart from shutdown)

MaxAge (20 seconds) is mainly used when BPDUs stop arriving on an interface. It will wait MaxAge - MessageAge seconds before removing the current stored BPDU for the port and considering its own or other received BPDUs.

The root bridge election and port state are chosen on reception of every BPDU (or if priorities are changed within the bridge). They are not tied to any port state and happen continuously whenever there is a change that warrants a recalculation (BPDU arrives, STP settings changed, port state change)

Related Topic