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, 4 for SPT |
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 |
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 |
For more information on the topology change process and how BPDUs are involved, take a look at STP topology change process and STP Topology Change (TC) flag.
Links:
https://networklessons.com/cisco/ccie-routing-switching-written/spanning-tree-reconvergence
https://en.wikipedia.org/wiki/Spanning_Tree_Protocol#Bridge_Protocol_Data_Unit_fields