STP Port Roles

In this article we will discuss STP Port Roles, will make brief discussion on STP Port Roles, In last article we discuss about Spanning Tree Algorithm.

IEEE 802.1D STP and RSTP use the Spanning Tree Algorithm (STA) to determine which switch ports on a network must be put in blocking state to prevent loops from occurring.

The STA designates a single switch as the root bridge and uses it as the reference point for all path calculations. The root bridge (switch S1) is chosen through an election process.

All switches that are participating in STP exchange BPDU frames to determine which switch has the lowest bridge ID (BID) on the network. The switch with the lowest BID automatically becomes the root bridge for the STA calculations.

Note: For simplicity, assume until otherwise indicated that all ports on all switches are assigned to VLAN 1. Each switch has a unique MAC address associated with VLAN 1.

A BPDU is a messaging frame exchanged by switches for STP. Each BPDU contains a BID that identifies the switch that sent the BPDU. The BID contains a priority value, the MAC address of the sending switch, and an optional extended system ID. The lowest BID value is determined by the combination of these three fields.

After the root bridge has been determined, the STA calculates the shortest path to the root bridge. Each switch uses the STA to determine which ports to block. While the STA determines the best paths to the root bridge for all switch ports in the broadcast domain, traffic is prevented from being forwarded through the network. The STA considers both path and port costs when determining which ports to block. The path costs are calculated using port cost values associated with port speeds for each switch port along a given path. The sum of the port cost values determines the overall path cost to the root bridge. If there is more than one path to choose from, STA chooses the path with the lowest path cost.

When the STA has determined which paths are most desirable relative to each switch, it assigns port roles to the participating switch ports. The port roles describe their relation in the network to the root bridge and whether they are allowed to forward traffic:

  • Root ports – Switch ports closest to the root bridge in terms of overall cost to the root bridge. The root port selected by STP on S2 is F0/1, the link between S2 and S1. The root port selected by STP on S3 is F0/1, the link between S3 and S1. Root ports are selected on a per-switch basis.
  • Designated ports – All non-root ports that are still permitted to forward traffic on the network. Switch ports (F0/1 and F0/2) on S1 are designated ports. S2 also has its port F0/2 configured as a designated port. Designated ports are selected on a per-segment basis based on the cost of each port on either side of the segment and the total cost calculated by STP for that port to get back to root bridge. If one end of a segment is a root port, then the other end is a designated port. All ports on the root bridge are designated ports.
  • Alternate and backup ports – Alternate ports and backup ports are in discarding or blocking state to prevent loops. The STA configured port F0/2 on S3 in the alternate role. Port F0/2 on S3 is in the blocking state. Alternate ports are selected only on links where neither end is a root port. Notice in the figure that only one end of the segment is blocked. This allows for a faster transition to the forwarding state when necessary. (Blocking ports only come into play when two ports on the same switch provide redundant links through the network.)
  • Disabled ports – A disabled port is a switch port that is shut down.

Add a Comment

Your email address will not be published. Required fields are marked *