Spanning Tree Protocol – What is a BPDU ?

BPDU Overview and Details

Bridge Protocol Data Units (BPDUs)

Introduction to BPDUs

Bridge Protocol Data Units (BPDUs) are network messages exchanged between switches to share information about the network topology. They are crucial for the operation of the Spanning Tree Protocol (STP) and its variants, such as Rapid Spanning Tree Protocol (RSTP).

Types of BPDUs

  • Configuration BPDUs: Used to transmit information about the network topology and maintain the spanning tree structure.
  • Topology Change Notification (TCN) BPDUs: Used to signal changes in the network topology.

Fields in a Configuration BPDU

| Field              | Size (Bytes) |
|--------------------|--------------|
| Protocol ID        | 2            |
| Version            | 1            |
| BPDU Type          | 1            |
| Flags              | 1            |
| Root Bridge ID     | 8            |
| Root Path Cost     | 4            |
| Bridge ID          | 8            |
| Port ID            | 2            |
| Message Age        | 2            |
| Max Age            | 2            |
| Hello Time         | 2            |
| Forward Delay      | 2            |
            
Field Description Size (Bytes)
Protocol ID Identifies the protocol type (e.g., STP). 2
Version Indicates the BPDU version (e.g., STP or RSTP). 1
BPDU Type Specifies the type of BPDU (e.g., Configuration BPDU, TCN BPDU). 1
Flags Contains various flags, including the Topology Change (TC) flag. 1
Root Bridge ID Identifier of the current root bridge. 8
Root Path Cost The cost to reach the root bridge from the transmitting switch. 4
Bridge ID Identifier of the bridge sending the BPDU. 8
Port ID Identifier of the port from which the BPDU is sent. 2
Message Age Age of the BPDU message. 2
Max Age Maximum age the BPDU can reach before being discarded. 2
Hello Time Time interval between the transmission of BPDUs. 2
Forward Delay Time the bridge will wait before transitioning to the forwarding state. 2

Important BPDU Fields

Among the various fields in a BPDU, the following are particularly important:

  • Root Bridge ID: This field is crucial as it identifies the current root bridge, which is the central reference point for the spanning tree.
  • Root Path Cost: Indicates the cost to reach the root bridge. Lower path costs are preferred, and this field helps in determining the best path.
  • Bridge ID: Identifies the bridge sending the BPDU. It is used in the election process to determine the root bridge.
  • Port ID: Identifies the port from which the BPDU is sent. It helps in identifying the root and designated ports.
  • Flags: The flags field contains the Topology Change (TC) flag, which is used to signal changes in the network topology, triggering a recalculation of the spanning tree.

Usage of BPDUs

BPDUs are used to perform the following functions in STP and RSTP:

  • Root Bridge Election: BPDUs are exchanged to elect the root bridge. The switch with the lowest Bridge ID (BID) becomes the root bridge.
  • Root Port Selection: BPDUs help each switch determine its root port, which is the port with the best path to the root bridge.
  • Designated Port Selection: On each network segment, the port with the lowest path cost to the root bridge becomes the designated port, which forwards traffic for that segment.
  • Topology Changes: BPDUs signal topology changes, causing the network to recalculate the spanning tree and maintain a loop-free topology.

Share this post