Content

| 3.2 |  | STP Processes |
| 3.2.1 |  | STP decisions and BPDU exchanges |

The spanning-tree algorithm operates as a function of Bridge ID, the Path Cost, and the Port ID. When creating a loop-free logical topology, spanning tree always uses the same four-step decision sequence:

Step 1 | Determine the Root Bridge
Step 2 | Calculate the lowest Path Cost to the Root Bridge
Step 3 | Determine the lowest sender BID
Step 4 | Determine the lowest Port ID

As a clarification, the initial step, determine the Root Bridge in the spanning tree is in essence the election of the bridge that has the lowest Bridge ID when compared with other bridges in the topology. This will be fully discussed in the following topics.

In order to make good decisions, STP needs to ensure that the participating bridges have the correct information. The bridges need to communicate the STP information between them. Bridges pass spanning-tree information between them using Layer 2 frames called Bridge Protocol Data Units (BPDUs). A bridge uses the four-step decision sequence to determine the “best” BPDU seen on each port. The bridge determines the best BPDU based on the four parameters just listed. The bridge stores the best BPDU it receives for each port. When making this evaluation, it considers all the BPDUs received on the port, as well as the BPDU it would send on that same port.

As each BPDU arrives, it is checked against this four-step sequence to see if it is more attractive 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.

Additionally, this “saving-the-best-BPDU” process also controls the sending of BPDUs. When a bridge first becomes active, all its ports send BPDUs every 2 seconds (the default Hello Time). However, if a port hears about a BPDU from another bridge that is more attractive than the BPDU it has been sending, the local port eventually stops sending BPDUs. If the more-attractive BPDU stops arriving from a neighbor for 20 seconds (the default Max Age), the local port resumes sending BPDUs. Max Age is the time it takes for the best BPDU to time out.