0% found this document useful (0 votes)
34 views6 pages

Understanding Spanning Tree Protocol

Spanning Tree Protocol (STP) uses a spanning-tree algorithm to prevent network loops. It blocks some switch ports so only one active connection remains between network segments. The algorithm selects the best path for traffic to take and activates only one redundant path at a time. Each non-root bridge has a root port connecting to the root bridge, and each network segment has a designated port for traffic. STP puts switch ports in blocking, forwarding, or other states to prevent loops from forming in the network.

Uploaded by

amit_post2000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views6 pages

Understanding Spanning Tree Protocol

Spanning Tree Protocol (STP) uses a spanning-tree algorithm to prevent network loops. It blocks some switch ports so only one active connection remains between network segments. The algorithm selects the best path for traffic to take and activates only one redundant path at a time. Each non-root bridge has a root port connecting to the root bridge, and each network segment has a designated port for traffic. STP puts switch ports in blocking, forwarding, or other states to prevent loops from forming in the network.

Uploaded by

amit_post2000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Spanning Tree Protocol – STP

Spanning Tree Protocol (STP) is an IEEE 802.1 standard, using software-based


spanning-tree algorithm on all bridge devices, including switcher, that blocks some ports
so that only one active connection remains between any LAN segment (collision
domain). . At the same time, it prevents loops that can occur with multiple active routes
between stops.

The spanning-tree algorithm is used in bridge and switcher based networks and decides
the best path that traffic can take from source to destination. This algorithm takes into
account all redundant paths and activates only one of them at any one time.

One root bridge per network in networks where Spanning-tree Protocol is actively used,
each non-root bridge has a root port, and each segment has a designated port for traffic
to pass through.

Some Spanning Tree Terms

• Bridge ID: The switcher's MAC address is its bridge ID. It is important for root
bridge selection in the network.
• Non-root bridge: All other bridges except root bridge are non-root bridge.
• Root port: The root port is always the one directly connected to or closest to the
root bridge.
• Designated port cost: It is considered if there is more than one non-root
connection between the two switchers. It is calculated by looking at the
bandwidth.
• Bridge Protocol Data Unit-BPDU: All switchers and bridges included in the
spanning-tree protocol in the same local area network (LAN) communicate with
each other via BPDU messages. BPDUs; It contains information such as
switcher's priority, port priority, port value, MAC address. The Spanning-tree
protocol also uses this information when selecting the root bridge, root port, and
assigned port.
• Convergence: Convergence occurs when all ports of switchers and bridges
transition from the blocking state to the transmitting state. Data is not transmitted
until convergence is complete. All devices must be updated before data can be
transmitted again. Convergence is important to ensure that all devices have the
same database, but it takes some time.

Root Bridge selection


The root bridge is the logical center of the spanning-tree topology in switched networks.
Each bridge on the topology claims to be root by sending messages called "hello
BPDU" to each other. In these messages;

• Identity of root bridge (BID): Initially, this value is its own ID as each bridge presents
itself as root bridge.
• Priority: It belongs to root bridge. Again, since each bridge presents itself as a root
bridge, this value is its own priority.
• The cost of reaching the root: Initially zero.
The root with the lowest priority in the root bridge selection process. If the priorities are
equal, the root with the lowest ID will be.

All other switches and bridges in the network are called non-root bridges.
Bandwidth STP Cost

4 Mbps 250

10 Mbps 100

16 Mbps 62

45 Mbps 39

100 Mbps 19

155 Mbps 14

622 Mbps 6

1 Gbps 4

10 Gbps 2

Responses to Network Change

Root bridges send "hello" BPDUs every two seconds to indicate that they are
operational. All other switches and bridges receive these BPDUs. If the "Hellos" are
coming from the path where the data is being moved, then the path to the root is still
standing. If there is a delay in receiving "Hello"s, the Spanning-tree process starts
again. The "Hello" BPDU defines the time bridges must wait while reacting to the
network change. These periods are; "Hello Time" is the longest waiting time (max age),
and forward delay.

• "Hello Time": Specifies how often the root will send by periodic "hello" BPDUs that
will be transmitted by successive bridge/switches. Its default time is 2 seconds.

• Longest wait time: The time the switch/bridges must wait after not hearing the
"hello"s before it changes the STP topology. Its default time is 20 seconds.
• Transmission delay: The time it takes for the interface to come from the blocking
state to the forwarding state.

In a stable network, STP operation works like this:

1. Root sends "hello" BPDUs from all its interfaces. (These BPDU’s cost 0.)

2. Neighbor switches/bridges add and forward "hello" BPDUs from non-root assigned
ports at their own cost.

3. Every switch/bridge in the network gets "hello" BPDU, it repeats step 2.

4. Each bridge repeats step 1 at each "hello time"

5. If a bridge/switch has not received a "hello" BPDU within the "hello time" period, it will
continue to operate normally for the longest waiting period, if it still has not received a
BPDU, it will react to change its STP topology.

Role of Spanning Tree Protocol

The spanning-tree algorithm puts each bridge and switch port in either a blocking or
transmitting state. These port states are;

• Blocking state: No frames can be sent or received from the ports, it only listens
to BPDUs. The purpose of this situation is to prevent the formation of loops. By
default, all ports are in the blocking state when the switchers are powered on.

• Listening State: Ports listen for BPDUs before relaying frames to ensure that
network loops are not occurring. In this state, ports are prepared to transmit data
without preparing the MAC address table.

• Learning State: Ports listen for BPDUs and learn all routes on the network.
Ports in this state start building the MAC address table but do not yet forward
frames.
• Forwarding State: Ports are considered to be in the active spanning-tree. All
transmit ports can receive and send frames.

• Disable State: The port in the passive (administrative) state does not participate
in frame forwarding and STP.

Spanning Tree Port States

Ports on Bridges and switches running STP switch between five different states.

• Blocking State: The port in the stack state does not forward frames, only listens
for BPDUs. The purpose of this situation is to prevent the formation of loops. By
default, all ports are in cluster state when switchers are powered on.

• Listening State: Ports listen for BPDUs before relaying frames to ensure that
network loops are not occurring. In this state, ports are prepared to transmit data
without preparing the MAC address table.

• Learning State: Ports listen for BPDUs and learn all routes on the network.
Ports in this state start building the MAC address table but do not yet forward
frames.

• Forwarding State: The port both sends and receives all data frames.

• Disable: The port in the passive (administrative) state does not participate in
frame forwarding and STP.

Switch ports are generally either in the transmit state or in the blocking state. Only when
the network topology changes (it happens when new switch is added or connection is
lost), ports can be in a listening and learning state.
Is MAC Address
Are Data Frames Is it a Temporary or
State Learned from Received
Transmitted? a Steady State?
Frames?

Blocking No No Steady

Listening No No Temporary

Learning No Yes Temporary

Forwarding Yes Yes Steady

Common questions

Powered by AI

Spanning tree port states include blocking, listening, learning, forwarding, and disable states. In the blocking state, ports do not send or receive frames but only listen for BPDUs to prevent loop formation. The listening state allows ports to listen for BPDUs before relaying frames to confirm no loops occur. During the learning state, ports build the MAC address table by listening to all network routes without forwarding frames. The forwarding state, where ports can send and receive data frames, occurs when loops are deemed not to be present. The disable state is passive, with no participation in frame forwarding or STP operations. These states facilitate STP's aim to manage network topology changes seamlessly, ensuring loop prevention by controlling when and where frames are forwarded throughout the network .

In STP, bandwidth is critically involved in determining the cost of a path via the spanning tree algorithm. Lower bandwidth results in higher cost values and vice versa, impacting path selection across the network. Efficient paths with higher bandwidth are preferred, lowering the total path cost for data transmission. This strategy helps in optimizing network traffic flow by utilizing faster routes, thereby minimizing latency and congestion, and preserving network resources .

Convergence in STP is crucial as it transitions ports from blocking to transmitting states, stabilizing the network after topological changes. Rapid convergence ensures minimal downtime and enables consistent data transmission. If convergence is slow, particularly during significant topology changes, the network may experience prolonged disruptions, resulting in packet loss and decreased performance as devices must update their databases to synchronize with the new network configuration. This could impede real-time communications and degrade overall network reliability and efficiency .

BPDU messages carry important network information used by bridges and switches to identify the network topology and to select the root bridge, root ports, and designated ports. BPDUs include data such as switcher's priority, port priority, port value, and MAC address, simplifying the process of synchronization in the network. They are essential in maintaining network stability by transmitting updates at set intervals, allowing the network to react promptly to changes and maintain a loop-free topology .

Despite its foundational role in preventing loops, STP can introduce latency and limit network performance due to its need for convergence and the blocking of redundant paths. Modern environments require consistent, high-speed data transmission, making STP's relatively slow convergence a bottleneck. Technologies such as Rapid Spanning Tree Protocol (RSTP) and Multiple Spanning Tree Protocol (MSTP) have emerged to address these limitations. They provide faster recovery and better resource utilization by optimizing data paths, thus aligning better with the demand for real-time data delivery and higher network throughput typical of contemporary network settings .

STP prevents network loops by blocking some ports and allowing only one active connection between any LAN segment, ensuring no loop occurs with multiple active paths. This protocol uses a software-based algorithm that decides on the best path for data from source to destination by evaluating all redundant paths. It employs the concept of root and non-root bridges, where one root bridge is chosen based on a lower priority value or lower ID if priorities are equal. Non-root bridges select a root port that provides the shortest path to the root bridge, calculated by bandwidth cost. Other ports on the network become designated ports facilitating traffic .

The root bridge serves as the logical center of the spanning-tree topology, controlling network paths and coordinating data distribution. The selection of a root bridge is driven by its bridge ID and priority. During the initial phase, each bridge claims to be the root by sending "Hello" BPDUs, with its own bridge ID as the identity and priority values involved. Bridges compare the priority values and select the one with the lowest priority to be the root; if priorities are equal, the bridge with the lowest ID becomes the root. This ensures that there is a single path across the network that prevents loops .

STP port states, such as listening and learning, are temporary states used during topology changes to ensure network stability by preventing loops before transmitting data. In contrast, blocking and forwarding states are steady states, essential for the regular operation of the network. Transitioning between temporary and steady states allows STP to adapt dynamically to new configurations, promoting a robust and loop-free network structure. However, excessive switching due to frequent changes can lead to network instability, increased convergence time, and higher processing demands on network switches .

When multiple bridges claim to be the root, STP deploys a resolution mechanism involving comparison of each bridge's BPDU information. Initially, each bridge sends a BPDU asserting itself as root with its own bridge ID and priority. The protocol first compares these priority numbers, and the bridge with the lowest priority is favored. If ties occur, the bridge ID serves as a tiebreaker, where the bridge with the lowest ID is selected as root. This simple yet effective mechanism helps prevent ambiguity in network architecture by ensuring a single bridge commands control as the logical network center .

The "Hello" BPDU functions as a periodic signal from the root bridge, affirming its operational status and the integrity of current paths. Distributed every two seconds, it enables neighboring switches to reinforce their connections and maintain the spanning tree topology. When a change occurs, the absence of "Hello" messages prompts the network to enter states like listening and learning to reconfigure paths and remove potential loops. The "Hello" BPDU interval, along with longest wait time and transmission delay, establishes timing norms for reacting to network changes, ensuring that only paths properly synced with BPDUs are active .

You might also like