Paths to Root

If the bridge is not elected as root, one or more ports provide a path back to the root bridge. The port with the best path is selected as the root port. The best path is the one that has the lowest designated cost. The lowest cost is the aggregate cost of all the LANs traversed between the port and the root bridge. Root Port Selection Based Upon Lowest Cost or Bridge ID displays root port configuration based upon lowest cost for Bridge A. If multiple ports have the same lowest cost, the one with the lowest bridge ID becomes the root port. The bridge ID is the ID of the transmitting bridge. The following figure displays root port configuration based upon lowest bridge ID for Bridge C.

Click to expand in new window
Root Port Selection Based Upon Lowest Cost or Bridge ID
Graphics/STPBestPathToRoot1.png

If there are ports with the same bridge ID, the port ID is used as a tie breaker. The port with the lowest port ID is chosen as root port. The port ID is a 2-byte value with the 4 most significant bits being the port priority and the 12 least significant bits being the bridge port number. Because the port priority occupies the most significant bits in the port ID, setting a lower port priority assures that port will be selected as root. In the case of no single port having a lowest port priority, the root port is selected based upon the overall port ID value. The figure below presents a root port configuration for Bridge B determined by the port priority setting. If there is still a tie, these ports are connected via a shared medium. The final tie breaker is the receiving port ID.

Click to expand in new window
Root Port Selection Base Upon Lowest Port ID
Graphics/STPBestPathToRoot2.png

After selecting the root port, the bridge‘s cost to root is the total of the root port‘s designated cost as advertised in the received BPDU, plus the path cost associated with that port. In a hierarchically designed network, the designated cost for ports attached to the next higher level will be less than the bridge‘s cost to the root. Ports attached to bridges on the same level will have designated costs equal to the bridge‘s cost to the root. Likewise, this bridge‘s port will advertise the bridge‘s cost to the root. Thus one port connected to the LAN will be the designated port and the other(s) will be alternate. The port on the bridge with the lower ID will be the designated port.