One network technology that can be used to avoid layer 2 loops is the Spanning Tree Protocol (STP). Alright, let’s get down to business and educate ourselves on the subject of the rapid and multiple-spanning tree protocol that is used in networking.
Spanning Tree Protocol Overview
Spanning Tree Protocol (STP) is a network protocol implemented to prevent layer 2 loops. For Ethernet networks, the Spanning Tree Protocol (STP) creates a logical architecture devoid of loops. STP’s primary purpose is to stop bridge loops and the broadcast radiation they cause. If an active link breaks, spanning trees also enable the inclusion of backup links in a network design that provides fault tolerance.
In a network of interconnected layer-2 bridges, STP builds a spanning tree that describes the relationships between nodes. It then disables any links that are not in the spanning tree, leaving just one active channel between any two nodes in the network to improve the availability of networks. However, network failures may result from its lengthy convergence time.
On the other hand, the Rapid Spanning Tree Protocol, which is a more recent protocol, is intended to provide faster convergence times than the Spanning Tree Protocol STP. Because RSTP employs a new approach to finding the spanning tree, it can converge considerably faster than normal STP.
Within a single Layer 2 network, several spanning trees can also be created using the Multiple Spanning Tree Protocol (MSTP), an extension of the Spanning Tree Protocol (STP). Network performance and scalability can be enhanced by doing this, which can be helpful in big networks with plenty of VLANs.
This article gives an overview of the spanning tree protocol, the rapid spanning tree protocol, and the multiple spanning tree protocol.
Spanning Tree Protocol Operation
Because switches in local area networks (LANs) are frequently connected via redundant links to provide resilience if one connection fails, the Spanning Tree Protocol (STP) became necessary. Unfortunately, the switching loop that is produced by this connection setup leads to MAC table instability and broadcast radiation. Switching loops must be avoided if switches are connected by redundant lines.
Switches use STP to monitor the network topology to prevent issues that arise from duplicated links in a switched local area network. All connections between switches, especially those that are redundant, are indexed. By creating a single preferred link between switches in the LAN, the spanning-tree algorithm subsequently prevents forwarding on redundant lines. All Ethernet frames use this preferred link unless it fails, in which case a non-preferred redundancy link is activated. One layer-2 switch is designated as the root bridge when STP is used in a network. Next, all switches block unnecessary links and choose their optimal route to the root bridge for forwarding traffic. Bridge protocol data units (BPDUs) are used by all switches to continuously interact with their LAN neighbors.
Upon the election of the root bridge by STP-enabled switches inside a LAN, the root port is assigned by all non-root bridges to one of their ports. If multiple paths exist, this is either the port that links the switch to the root bridge or the port with the root bridge’s determined preferred path.
Stp Port States
When STP is enabled, the network bridge assigns one of the following five states to its ports to regulate frame forwarding.
#1. Blocking
Following startup, the port enters the blocking state and waits for BPDUs. No user data is broadcast or received over a blocking port to avoid the use of looped pathways; hence, ports in this state never take part in frame forwarding because it is seen as a non-designated port. There is a 20-second time limit or infinite time.
Once the port has completed the booting process, after the given amount of time without receiving BPDUs, or when it believes it to be the root bridge, it will enter the listening state.
#2. Listening
We consider the listening state to be the first state. The entry into this interface comes after the stopping state. You can identify which interface is appropriate for frame forwarding with the aid of the interface.
It only sends and receives BPDUs and redirects them to the switch module to ascertain the Layer 2 topology when the port is in the listening state—no user data travels through it. The root bridge, root ports, and designated ports are elected during this phase.
The listening state primarily performs the following functions:
- Destroys frames received on the port.
- Do not memorize addresses.
- Receives BPDUs.
#3. Learning
The port transitions from the condition of listening to that of learning. It looks for and listens for BPDUs but doesn’t pay attention to frames that come from another port or are part of the linked network segment. Along with this, it begins adding the new information it has learned to the address table. Furthermore, it handles user frames but doesn’t send them on.
In the learning state, we carry out the following tasks:
- Discarding frames received on the port.
- Receiving BPDUs.
- Discovering and learning addresses
#4. Forwarding
Frame forwarding between network segments begins when the port transitions from the learning state to the forwarding state. This includes frames that are forwarded from one port to another and from the network segment that is attached. In addition, receiving, processing BPDUs, and updating the address table are ongoing tasks for the port.
The following tasks are carried out in the forwarding state:
- Getting frames that come in on the port and sending them on.
- Discovering addresses.
- Retrieving BPDUs.
#5. Disabled
The disabled port doesn’t take part in STP or frame forwarding processes which means the port is administratively shut down.
A disabled interface can carry out the following functions:
- Erase frames received on the port.
- Fails to memorize addresses.
- Rejects BPDUs.
Advantages of Stp
The following advantages result from using STP:
- Avoids bridge loops: Bridge loops can cause broadcast storms and network outages, but STP avoids them.
- Offers fault tolerance: STP offers fault tolerance by enabling the network to function even in the event of a link failure.
- Enhances network performance: By decreasing traffic on the network and averting broadcast storms, STP can enhance network performance.
- Reduced technical requirements: Running the STP requires far less CPU and memory when compared to other STP types.
Disadvantages of Stp
Some drawbacks include the following;
- Complexity: Configuring and troubleshooting STP is a difficult protocol.
- Convergence time: Network failures may result from STP’s protracted convergence.
- Inefficiency: By obstructing unnecessary pathways, STP might waste bandwidth.
- The best way to access a network may not always be via the less optimal path determined by taking the best cost to the root bridge.
Multiple Spanning Tree Protocol
The IEEE established this standard, which groups VLANs and performs RSTP for each group. In essence, this is one Spanning Tree Protocol running on top of another.
A bridged local area network can have simple or full connectivity assigned to any given virtual LAN (VLAN) thanks to the Multiple Spanning Tree Protocol (MSTP) and algorithm. To prevent loops in each Multiple Spanning Tree instance (MSTI) and the common and internal spanning tree (CIST), MSTP uses bridge protocol data units (BPDUs) to transport information between spanning-tree-compatible devices. You choose active and blocked paths to do this.
Multiple Spanning Tree Instance Ports
- Root: Provides the shortest path between the bridge and the MSTI Regional Root.
- Designated: Provides the least complicated path from the linked LANs to the regional root via the bridge.
- Master: Provides network access to a CIST root located outside the locale. The Master port for all MSTI is the Bridge Port, which serves as the CIST Root harbor for the CIST Regional Root.
- Alternate or Backup: Provides network in case other Bridges, Bridge ports, or LANs fail or are destroyed.
Advantages of Mstp
- Because MSTP requires less computation from bridges, it offers much better scaling.
- Multiple VLANs can share STP instances thanks to MSTP.
- The IEEE has standardized MSTP in the 802.1Q-2014 report.
- MSTP is a functional protocol with a good structure.
- MSTP has elevated redundancy.
- MSTP requires less use of the CPU and memory.
Disadvantages of Mstp
- Each bridge in the arrangement must map VLANs to STP protection according to MSTP. When done by hand, this will be tedious and prone to errors.
- To implement MSTP, one must have a solid understanding of networking.
Rapid Spanning Tree Protocol
This type of network protocol, called Rapid Spanning Tree Protocol (RSTP: IEEE 802.1w), is an improvement on Spanning Tree Protocol (STP: IEEE 802.1D). It encourages high availability and a “loop-free” topology in Ethernet networks.
One of the main benefits of RSTP networks over standard daisy chain architectures is their high availability. When a network failure happens, devices can still communicate with each other because they can redirect data to avoid disruption. Because RSTP reduces downtime compared to typical network topologies, it offers a significant advantage over those architectures for critical systems, which are highly resilient to faults and hardware failures.
RSTP prevents network loops when numerous switches are in use by obstructing redundant network pathways. To eliminate network loops, the protocol essentially consists of a set of rules that switch on the network and are used to identify the most effective method to deliver broadcasts over the network by creating a “root bridge” and blocking particular ports.
Some similarities between STP and RSTP include:
- STP and RSTP choose the bridge with the lowest bridge ID as the root bridge.
- Switches forward BPDUs in both STP and RSTP protocols.
- The method used to elect roots and specified ports is the same as that used for STP, and their functionality is also the same.
Port Roles in Rstp
The four-port roles in RSTP include;
- Root Port: The root port is chosen based on which port has the lowest route cost. There can only be one root port on a non-root bridge. Root ports forward data to the bridge.
- Designated Port: Every LAN segment uses this non-root port for forwarding traffic.
- Backup Port: It leads to a portion where another bridge port is already linked, serving as a backup route. Although these ports continue to be restricted, they nevertheless receive BPDUs from their switches.
- Alternate Port: This port role has a less favorable route cost and is also a backup port. They still restrict every one of these ports.
Port States in Rstp
The Rapid Spanning Tree Protocol supports three port states as opposed to the five states initially supported by the regular Spanning Tree Protocol. The three states include:
- Discarding: No user data is sent over the port when the discarding state is in effect.
- Learning: The ports learn the MAC address while they are in the learning state, but they are not forwarding any frames.
- Forwarding: The ports are fully functional and able to send data when they are in the forwarding state.
Differences Between Stp and Rstp
STP | RSTP |
When RB (the root bridge) reviews the bridge’s RP (root protocol), that’s when the bridge in STP sends out a BPDU. | Every time a switch says “hello,” BPDU is sent out in the case of RSTP. |
Root Port and Designated Port are the two port types included in STP. | Backup, alternate, and additional ports are included in the RSTP technique. |
Advantages of Rstp
- Keeps networks from looping.
- Averts duplication.
- Quicker convergence.
- Compatible with STP backward.
- Each switch generates and sends out BPDUs at the hello interval.
- Artificial forward delay timers are not necessary for switches.
Spanning Tree Protocol Cisco
#1. Per VLAN Spanning Tree + (PVST+)
Cisco created the spanning tree standard, which determines the root bridge for each VLAN, for use with its equipment. It is STP’s default version, as used by Cisco. For every VLAN, it locates a different 802.1d spanning tree instance. Additionally, it offers backward compatibility with CST or 802.1d. Because it offers the best path selection as distinct instances of STP for each VLAN are found, this is better optimized to the IEEE standards. This lags behind CST.
#2. Rapid Per VLAN Spanning Tree + (RPVST+)
Cisco developed the Spanning Tree standard, which identifies a separate instance of 802.1w per VLAN and offers faster convergence than PVST+. In comparison to other STP standards, it demands a lot more CPU and memory.
How does spanning tree protocol work?
STP calculates the path cost based on the media speed (bandwidth) of the links between switches and the port cost of each port forwarding frame. The spanning tree selects the root port based on the path cost. The port with the lowest path cost to the root bridge becomes the root port.
What is the difference between STP and OSPF?
Open shortest path first (OSPF) is one of the dynamic routing protocols that uses a link-state algorithm to build and calculate the shortest path to all known destinations. STP functions as a protocol for managing connections using the spanning tree algorithm.
What are the 4 states of the Spanning Tree Protocol?
The four states of the Spanning Tree Protocol (STP) are:
– Blocking: A non-designated port that does not participate in frame forwarding.
– Listening: The first state after blocking. The switch listens for and sends BPDUs.
– Learning: The switch receives a superior BPDU, stops sending its BPDUs, and relays the superior BPDUs. This state prepares STP to participate in frame forwarding.
– Forwarding: The port forwards traffic.
What are the 5 stages of Spanning Tree Protocol?
The five port states of Spanning Tree Protocol (STP) are: blocking, listening, learning, forwarding, and disabled.
In Summary,
An Ethernet network’s loop-free topology is guaranteed by the Spanning Tree Protocol (STP). It is a basic technique in network design that is used to stop broadcast storms and other issues that arise from redundant pathways in a network. Any Ethernet network with redundant pathways between switches must include STP. STP is a well-known and extensively used protocol that can successfully eliminate bridge loops and enhance network performance, despite some of its shortcomings.
Various other types of STP are improvements on the original IEEE 802.1D STP, such as multiple spanning tree protocols, rapid spanning tree protocols, and other Cisco proprietary spanning tree protocols, each with its own specific features and advantages when employed in networking. Comprehending STP ideas thoroughly is essential for network administrators to maximize network dependability and performance.
What is the spanning tree of a network?
Spanning Tree Protocol (STP) is a Layer 2 network protocol used to prevent looping within a network topology.
What are STP types?
Types of STP are Rapid Spanning Tree Protocol, virtual LAN, Per VLAN spanning tree, Per VLAN Rapid spanning tree, Multiple Spanning Tree Protocol, etc
Why is it called spanning tree?
A spanning tree is called a spanning tree because it covers all vertices and is a tree.
What is spanning tree in CCNA?
Spanning Tree Protocol (STP) is a network protocol that prevents Layer 2 loops in CCNA.
- HOW TO FORWARD PHONE CALLS ( Number, Carrier & Phone)
- HOW TO MAKE GIF IN PHOTOSHOP: EASY Guide
- Apple Rapid Security Response Update: Everything You Need to Know
- OPTIMAL WORKSHOP: Features, Review, Pricing & More
- TOP 11 LONGEST BRIDGES IN THE WORLD ( 2023 Updates)