STP - BPDU generation and port roles
Spanning Tree Protocol (STP) uses what are known as BPDUs of various types to communicate and maintain the condition of STP within a topology. BPDUs are sent out of specific ports that have particular roles. This behavior differs for standard STP and for RSTP since their port states are different and they function differently.
The following indicates what port roles send out BPDUs and under what conditions:
Standard STP (IEEE 802.1D)
BPDUs are generated and sent by the root bridge every "Hello Time" which by default is 2 seconds. Non-root bridges also forward BPDUs received from the root bridge according to this interval.
Specifically:
- Root Bridge: Sends BPDUs every 2 seconds.
- Non-Root Bridges: Forward the received BPDUs every 2 seconds.
This means that:
- BPDUs are generated only by the root bridge
- Non-root bridges forward BPDUs that they receive
- BPDUs are generated only by Designated ports on the root bridge, and are forwarded only by designated ports on non-root bridges
- Root ports on non-root bridges will not forward BPDUs. (except for TCN BPDUs. See below.)
- Blocked ports receive BPDUs but don't forward them
- Disabled ports don't send or receive BPDUs.
Note that:
- The above are true for control BPDUs. A TCN BPDU on the contrary will be forwarded out of the root port to reach the root bridge.
- If STP is disabled ports with no role will forward BPDUs but will not process them.
Rapid STP (IEEE 802.1w)
In RSTP, BPDUs are sent and received on all operational ports regardless of their role, but the way they process these BPDUs will depend on their role:
- Root Ports receive BPDUs from the root bridge. They keep track of these BPDUs to monitor the health of the spanning tree and adjust if necessary.
- Designated Ports send BPDUs to the root port on another switch. The designated port's function is to share information about the topology with other switches.
- Alternate Ports receive BPDUs. This port has an alternative path to the root bridge, different from the one used by the root port.
- Backup Ports also receive BPDUs. This port provides a redundant (backup) path to a segment where another switch port already connects.
The process of sending and receiving BPDUs allows switches to communicate their configuration information with each other, allowing the network to construct and maintain the loop-free tree topology.
Links
https://networklessons.com/cisco/ccie-routing-switching-written/spanning-tree-reconvergence https://networklessons.com/cisco/ccie-routing-switching-written/rapid-spanning-tree-rstp