STP Convergence

Switches follow four steps to converge the topology into a spanning tree:

1. The switches elect a single switch as the root bridge.

2. The switches elect a port on each switch (known as the root port) that provides the lowest-cost to the root bridge.

3. For each LAN segment, the switches elect a designated bridge and a designated port on that swi The designated port is a port on the LAN segment that has the lowest-cost path to the root bride The designated port forwards frames from the LAN segment toward the root bridge. (All ports on root bridge are designated ports.)

4. Finally, the switches determine which switch ports are to be included in the spanning-tree topolc The ports selected are the root ports and designated ports. These ports forward traffic. Other po block traffic.

When first booted, switches assume that they are the root and transmit configuration BPDUs on each po with their bridge ID in the Root Bridge field. The switches set the cost to the root to zero. In addition to sending BPDUs, each switch receives BPDUs on each of its ports. A switch saves only the best BPDU for each port. The switch determines which message is best by evaluating BPDUs received on the port as w as the BPDU that it would send on the port. If the new BPDU (or the locally generated BPDU) is better, the old message is replaced.

To determine the best BPDU, the switch checks four criteria, in order. The four criteria are as follows:

1. Lowest root bridge ID

2. Lowest path cost to the root bridge

3. Lowest sender bridge ID

4. Lowest port ID

After the root has been determined, each nonroot switch determines which of its ports is closest to the bridge. That port becomes the root port. Switches use the concept of cost to judge closeness to the roo Switches track a cumulative cost of all links to the root bridge. Each LAN segment has a cost. Table 5-1 shows the default value of cost for links of different speeds.

Table 5-1. Default IEEE 802.1D Cost Values

Link Speed

Recommended IEEE 802.1D Cost

4 Mbps

250

10 Mbps

100

16 Mbps

62

100 Mbps

19

1 Gbps

4

10 Gbps

2

When a switch boots it participates in the STP convergence process to determine which of its ports will root or designated ports, and which ports must block the flow of traffic. During the convergence process each switch port goes through four STP states, in the order presented in the following list:

• Blocking. Receives BPDUs only

• Listening. Builds the spanning tree

• Learning. Builds the switching (bridging) table

• Forwarding. Sends and receives user data

After initialization, a port that is not shut down or administratively disabled begins in the blocking state, where it listens for BPDUs. The switch port does not learn MAC addresses or send or receive user frame the blocking state.

A switch port transitions to listening after expiration of a short timer or receipt of a configuration BPDU this port or another port. While in the listening state, the port still does not send any user data or buildi the switching table, but it is sending and receiving BPDUs in an effort to build the spanning tree. While this state, the port might determine that it really isn't a designated or root port and revert to the blocki state.

Ports that remain designated or root ports after 15 seconds (the default Forward Delay timer) progress the learning state where they start building the switching table. User data is still not being passed, however. Learning lasts for another 15 seconds (the default Forward Delay timer). The learning state reduces the amount of flooding required when data forwarding beings.

If a port is still a designated or root port at the end of the learning state period, the port transitions into forwarding state. At this point, the port finally starts sending and receiving user data frames. Note that over 30 seconds have elapsed. The exact amount of time depends on how much time elapses before a | transitions from blocking to listening, which depends on the switch's capabilities and configuration.

Continue reading here: Virtual LANs

Was this article helpful?

+1 -2