Four-Step STP Decision Sequence
When creating a loop-free logical topology, Spanning Tree always uses the same four-step decision sequence:
- Lowest Root BID
- Lowest Path Cost to Root Bridge
- Lowest Sender BID
- Lowest Port ID
Bridges pass Spanning Tree information between themselves using special frames known as bridge protocol data units (BPDUs). A bridge uses this four-step decision sequence to save a copy of the best BPDU seen on every port. When making this evaluation, it considers all of the BPDUs received on the port as well as the BPDU that would be sent on that port. As every BPDU arrives, it is checked against this four-step sequence to see if it is more attractive (that is, lower in value) than the existing BPDU saved for that port. If the new BPDU (or the locally generated BPDU) is more attractive, the old value is replaced.
Bridges send configuration BPDUs until a more attractive BPDU is received.
In addition, this “saving the best BPDU” process also controls the sending of BPDUs. When a bridge first becomes active, all of its ports are sending BPDUs every 2 seconds (when using the default timer values). However, if a port hears a BPDU from another bridge that is more attractive than the BPDU it has been sending, the local port stops sending BPDUs. If the more attractive BPDU stops arriving from a neighbor for a period of time (20 seconds by default), the local port can once again resume the sending of BPDUs.
There are actually two types of BPDUs: Configuration BPDUs and Topology Change Notification (TCN) BPDUs. The first half of this chapter only discusses Configuration BPDUs. The second half discusses TCNs and the differences between the two.