Bridge Protocol Data Units (BPDUs) are messages exchanged between bridges (switches) in Ethernet networks running the Spanning Tree Protocol (STP), Rapid Spanning Tree Protocol (RSTP), or Multiple Spanning Tree Protocol (MSTP). BPDUs contain information about the bridge and its ports, such as Bridge ID, Root ID, Path Cost, Port ID, and other parameters.
BPDUs are classified as superior or inferior based on the information they carry and how it compares to the current information stored on a receiving bridge.
- A superior BPDU is a BPDU that carries better information about the path to the root bridge than the information currently stored on the receiving bridge.
- A BPDU is considered superior if it has a lower Root ID, or if the Root IDs are equal, a lower Path Cost to the root bridge, or if both the Root ID and Path Cost are equal, a lower Bridge ID.
- When a bridge receives a superior BPDU, it updates its own information, port roles, and states accordingly. It may also trigger a topology change or a new root port election.
- An inferior BPDU is a BPDU that carries worse or equal information about the path to the root bridge compared to the information currently stored on the receiving bridge.
- A BPDU is considered inferior if it has a higher Root ID, or if the Root IDs are equal, a higher Path Cost to the root bridge, or if both the Root ID and Path Cost are equal, a higher Bridge ID.
- When a bridge receives an inferior BPDU, it usually ignores the information and continues to use its own stored information.
The difference between superior and inferior BPDUs lies in the quality of the path information they carry relative to the receiving bridge's stored information. Superior BPDUs carry better information about the path to the root bridge, while inferior BPDUs carry worse or equal information. Bridges update their information, port roles, and states based on superior BPDUs, whereas they typically ignore inferior BPDUs.
When Superior and Inferior BPDUs are sent?
Superior and inferior BPDUs are not explicitly "sent" based on their superiority or inferiority. Instead, bridges periodically send BPDUs containing their current path information, and the receiving bridges determine whether the incoming BPDU is superior or inferior based on the information it carries.
Here are some scenarios in which superior and inferior BPDUs might be received:
Network Initialization: When a network is first initialized, bridges start exchanging BPDUs to determine the root bridge and establish the spanning tree topology. During this process, bridges will receive both superior and inferior BPDUs as they learn about the network and update their path information.
Topology Change: If there is a change in the network topology (e.g., a link failure, a new link, or a change in link cost), bridges may receive superior BPDUs that reflect the new best path to the root bridge. In this case, the receiving bridge will update its information and possibly reconfigure its port roles and states.
Periodic BPDU Transmission: Bridges periodically send BPDUs to maintain the spanning tree topology and ensure that other bridges have up-to-date information. In a stable network, bridges will typically receive inferior BPDUs from other bridges, as the path information they carry is either the same or worse than the receiving bridge's current information.
Misconfiguration or Network Instability: In some cases, network misconfigurations or instability might cause a bridge to receive superior BPDUs when it is not expected. This can trigger unnecessary topology changes or instability in the network. It is crucial to ensure proper network design and configuration to minimize these occurrences.
It is important to note that bridges do not intentionally send "superior" or "inferior" BPDUs. They simply transmit BPDUs containing their current path information, and the receiving bridges classify the BPDUs as superior or inferior based on a comparison with their own stored information.