STP contents of a BPDU
A Bridge Protocol Data Unit (BPDU) has a number of fields that contain information for STP to operate correctly:
Field No. | Bytes | Field Description |
---|---|---|
1 | 2 | Protocol ID - set to zero for IEEE 802.1D |
2 | 1 | Protocol version ID - set to 0 for a config and TCN BPDU, set to 2 for RST, 3 for MST, and 4 for SPT BPDUs |
3 | 1 | BPDU Type - set to 0 for config BPDU, 128 for TCN, 2 for RST/MST Config BPDU |
4 | 1 | Flags - indicate various things such as topology changes and acknowledgments among others. The format of the flags depends on the type of STP. (See below) |
5 | 8 | Root ID - indicates the root bridge by listing a 2-byte priority, followed by the MAC address ID |
6 | 4 | Root path cost - indicates the cost of the path from the bridge sending the BPDU to the root bridge |
7 | 8 | Bridge ID - indicates the priority and MAC address ID of the bridge sending the BPDU |
8 | 2 | Port ID - indicates the port number from which the BPDU was sent |
9 | 2 | Message age - the amount of time in seconds since the root bridge sent the current configuration BPDU |
10 | 2 | Max age - indicates the age in seconds at which time the current BPDU should be discarded |
11 | 2 | Hello time - the interval between BPDU messages |
12 | 2 | Forward delay - the length of time in seconds that a bridge should wait before transitioning to a new state after a topology change |
Note that a version ID of 4 corresponds to a Shortest Path Tree (SPT) BPDU which is part of the development and implementation of Shortest Path Bridging (SPB) as specified in the IEEE 802.1aq standard.
Flags format
The format of the flags field depends upon the type of STP being run.
IEEE 802.1D
Where each of the above fields is one bit:
- TC - Topology Change flag
- U - Unused flag
- TCA - Topology Change Acknowledgement flag
IEEE 802.1w
Where each of the above fields is one bit except for Port Role:
- TC - Topology Change flag
- Proposal flag
- Port role (two bits):
- 00 - Unknown
- 01 - Alternate port
- 10 - Root port
- 11 - Designated port
- Learning flag
- Forwarding flag
- Agreement flag
- Topology Change Acknowledgement flag
For more information on the topology change process and how BPDUs are involved, take a look at:
- STP - RSTP BPDU Flags and their usage
- STP topology change process
- STP Topology Change (TC) flag
- STP - Topology Change Acknowledgement (TCA)
Links
https://networklessons.com/cisco/ccie-routing-switching-written/spanning-tree-reconvergence
Links to this page:
- SPAN capturing control packets
- STP - RSTP BPDU Flags and their usage
- STP - Topology Change Acknowledgement (TCA)
- STP - Understanding MST regional root identifier and proposal-agreement process
- STP Max Age
- STP Message Age
- STP Root Bridge selection
- STP how a switch identifies a BPDU
- STP topology change process