When the devices in a network are powered up, each functions as the root device. Each device sends a configuration BPDU through all its ports. The BPDUs communicate and compute the spanning-tree topology. Each configuration BPDU contains this information: • The unique bridge ID of the device that the sending device identifies as the root device.
• The spanning-tree path cost to the root • The bridge ID of the sending device • Message age • The identifier of the sending interface • Values for the hello, forward delay, and max-age protocol timers When a device receives a configuration BPDU that contains superior information (lower bridge ID, lower path cost, and so forth), it stores the information for that port. If this BPDU is received on the root port of the device, the device also forwards it with an updated message to all attached LANs for which it is the designated device. If a device receives a configuration BPDU that contains inferior information to that currently stored for that port, it discards the BPDU.
If the device is a designated device for the LAN from which the inferior BPDU was received, it sends that LAN a BPDU containing the up-to-date information stored for that port. In this way, inferior information is discarded, and superior information is propagated on the network. A BPDU exchange results in these actions: • One device in the network is elected as the root switch (the logical center of the spanning-tree topology in a switched network). See the figure following the bullets. For each VLAN, the device with the highest device priority (the lowest numerical priority value) is elected as the root switch.
If all devices are configured with the default priority (32768), the devices with the lowest MAC address in the VLAN becomes the root device. The device priority value occupies the most significant bits of the bridge ID, . • A root port is selected for each device (except the root switch). This port provides the best path (lowest cost) when the device forwards packets to the root switch. • The shortest distance to the root switch is calculated for each device based on the path cost. • A designated device for each LAN segment is selected. The designated device incurs the lowest path cost when forwarding packets from that LAN to the root switch.
The port through which the designated device is attached to the LAN is called the designated port. All paths that are not needed to reach the root switch from anywhere in the switched network are placed in the spanning-tree blocking mode. Bridge ID, Device Priority, and Extended System ID The IEEE 802.1D standard requires that each device has a unique bridge identifier (bridge ID), which controls the selection of the root switch. Because each VLAN is considered as a different logical bridge with PVST+ and Rapid PVST+, the same device must have a different bridge ID for each configured VLAN. Each VLAN on the device has a unique 8-byte bridge ID.
The 2 most-significant bytes are used for the device priority, and the remaining 6 bytes are derived from the device MAC address. Configuring Spanning Tree Protocol Bridge ID, Device Priority, and Extended System ID Configuring Spanning Tree Protocol 3