BPDU Format
A BPDU carries the BID, root path cost, and PID. There are two types of STP BPDUs:
- Configuration BPDUs are heartbeat packets. STP-enabled designated ports send configuration BPDUs at Hello timer intervals.
- Topology Change Notification (TCN) BPDUs are sent only after a device detects a network topology change.
A BPDU is encapsulated in an Ethernet frame. Its destination MAC address is a multicast MAC address, 01-80-C2-00-00-00. The Length field specifies the number of bytes of the Data field (excluding the CRC field). The LLC header and BPDU packet header are appended to the Length field in sequence. Figure 14-6 shows the Ethernet frame format.
Configuration BPDU
Configuration BPDUs are the most common type of BPDU and are sent to exchange topology information among STP devices.
Each bridge actively sends configuration BPDUs during initialization. After the network topology becomes stable, the designated port of each device periodically sends configuration BPDUs.
A configuration BPDU is at least 35 bytes long and includes parameters such as the BID, root path cost, and PID. A bridge processes a received configuration BPDU only if either the sender BID or PID is different from that on the local bridge receive port. If both fields are the same as those on the receive port, the bridge discards the configuration BPDU. Therefore, the bridge does not need to process BPDUs with the same information as the local port.
- After STP is enabled on ports of a device, the designated port on the device sends configuration BPDUs at Hello timer intervals.
- When a root port receives a configuration BPDU with a priority higher than that of its own configuration BPDU, the device where the root port resides updates the configuration BPDU information stored on its STP ports based on the information in the received configuration BPDU and sends the information to a downstream device through a designated port. In contrast, if the root port receives a configuration BPDU with a priority lower than that of its own configuration BPDU, the root port discards the received configuration BPDU.
- When a designated port receives an inferior configuration BPDU, the designated port immediately sends its own configuration BPDU to the downstream device.
Table 14-6 describes fields in a BPDU.
Field |
Bytes |
Description |
---|---|---|
Protocol Identifier |
2 |
The value is fixed at 0, representing a spanning tree protocol. |
Protocol Version Identifier |
1 |
The value is fixed at 0, representing a spanning tree protocol. |
BPDU Type |
1 |
Indicates the type of a BPDU. The value is one of the following:
|
Flags |
1 |
Indicates whether the network topology has changed.
|
Root Identifier |
8 |
Indicates the BID of the current root bridge. |
Root Path Cost |
4 |
Indicates the accumulated path cost from a port to the root bridge. |
Bridge Identifier |
8 |
Indicates the BID of the bridge that sends the BPDU. |
Port Identifier |
2 |
Indicates the ID of the port that sends the BPDU. |
Message Age |
2 |
Records the time that has elapsed since the original BPDU was generated on the root bridge. If the configuration BPDU is sent from the root bridge, the Message Age value is 0. Otherwise, the Message Age value is the total time spent to transmit the BPDU from the root bridge to the local bridge, including the transmission delay. The Message Age value of a configuration BPDU increases by 1 each time the configuration BPDU passes through a bridge. |
Max Age |
2 |
Indicates the aging time of a BPDU. |
Hello Time |
2 |
Indicates the interval at which BPDUs are sent. |
Forward Delay |
2 |
Indicates the period during which a port stays in Listening and Learning states. |
Figure 14-7 shows the Flags field. Only the leftmost and rightmost bits are used in STP.
TCN BPDU
A TCN BPDU contains only three fields: Protocol Identifier, Version, and Type, as shown in Table 14-6. The Type field is four bytes long and is fixed at 0x80.
- A port transitions to the Forwarding state.
- A designated port receives a TCN BPDU and sends a copy to the root bridge.