The Wayback Machine - https://web.archive.org/web/20240717024655/https://www.geeksforgeeks.org/introduction-of-spanning-tree-protocol-stp/
Open In App

Introduction of Spanning Tree Protocol (STP)

Last Updated : 21 Sep, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

In a LAN, redundant links are added to improve the network availability of LAN. But these redundant links may cause the frame to loop in the network for an infinite time until some action is taken, e.g, some links are taken down. To cope with the problem of frame looping, Spanning Tree Protocol (STP) comes into play. 

Need for Spanning Tree: 

Consider the scenario below with 3 switches with one user attached to each switch. 

Looping of Frame in LAN

 

Arvind sends a broadcast frame to LAN and as nature of switch frame are send out from other ports (Gi0/1 & Gi0/2) except receiving port (Fa0/3). Now, this frame goes to SW2, SW2 also broadcast frame out of Gi0/2 and Fa0/2 ports. SW1 receives frame in its Gi0/1 ports. SW1 also broadcast frame then this frame goes to SW3 and frame broadcasting goes on. Remember that this frame broadcast also occurs in other direction from SW3 out of Gi0/1 port. Above discussed frame looping was from SW3’s Gi0/2 ports. You can imagine the frame flooding in that small LAN. This forever looping of frames around LAN is called Broadcast storm. This Looping of frames causes three problems as stated below:

  1. MAC table instability – Due to looping of frame around LAN, MAC-Table of switch get changed frequently. Looping causes incorrect MAC-table entries resulting in incorrect frame delivery.
  2. Broadcast Storm – Repeated forwarding of frames around links in LAN causes the inefficient use of links.
  3. Multiple Frame Transmission – A very serious negative effect of looping is that multiple copies of same frame are delivered to host. This process left host with confusion.

How Spanning Tree Protocol Helps?

Spanning tree protocol prevent looping of frames around LAN by placing ports of switch in either forwarding or blocking state. Interfaces (ports of switch) which are in forwarding state act as normally but Interfaces in blocking state doesn’t process any frame received except STP messages and other important overheads. Blocking Interfaces doesn’t learn MAC addresses, don’t forward frames and don’t process received frames. Now if we again consider the above discussed scenario with SW3’s Gi0/2 interface in blocking state. 

Frame looping prevention by STP

 

 

  • Arvind sends the frame to SW3.
  • SW3 forwards frame only to Gi0/1 port as Gi0/2 port is in blocking state.
  • Now SW1 receives frame and forward to Fa0/1 and Gi0/1 interfaces.
  • SW2 receives frame and forward to Fa0/2 and Gi0/1 interfaces.
  • SW3 will receive the frame on Gi0/2 interface but ignores the frame as it is in blocking state.

In this way looping of frame around LAN can be prevented by using STP.


Previous Article
Next Article

Similar Reads

Difference between Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP)
1. Spanning Tree Protocol (STP) : STP is also known as spanning tree protocol is a layer 2 (Data link layer) protocol, it runs on switches and bridges. The IEEE standard of STP is 802.1D. STP is a feature used to prevent loops when using redundant switches. For example, we have three switches they are all linked together and without STP a loop coul
4 min read
Types of Spanning Tree Protocol (STP)
Prerequisite - Spanning Tree Protocol Spanning Tree Protocol (STP) is used to make a loop free network by monitoring the network to track all the links and shut down the least redundant ones. Root bridge is a switch in a single VLAN or whole topology (according to the type of STP standard used) which is responsible for distributing BPDUs and block
3 min read
Working of Spanning Tree Protocol (STP)
Spanning Tree Protocol (STP) prevents the looping of the frame by putting the interfaces of the switch in either forwarding or blocking state. How Switch is able to decide which interface should be in forwarding or blocking state. We’ll learn the answer to this question in this article. Before we further proceed, we must know some terms. BID – It s
3 min read
How Spanning Tree Protocol (STP) Select Designated Port?
Spanning tree protocol is a type of communication protocol that functions to build a loop-free topology, which means the arrangement of elements in a computer network. STP commonly works for layer-2 bridges and switches. It also provides a backup link for the network system if the active link fails. Layer-2 devices send the data in the form of fram
3 min read
Topology Changes in Spanning Tree Protocol (STP)
Spanning Tree Protocol (STP) is used to prevent loops in the network due to redundant connections between switches in the network. It determines an efficient path from non-root switches to root switches with the help of Bridge Protocol Data Unit (BPDUs). BPDU carries information regarding topology changes within the network to notify all the switch
4 min read
Spanning Tree Topology (STP) Convergence
Once the Spanning Tree Topology (STP) is established, STP continues to work until some changes occurs. Manual changes that Network Engineer can apply are configuration of Bridge ID and port costs. Also there are other changes like the addition of switch or failure of port of an existing switch. The reaction of STP when some changes occurs by reconf
2 min read
Root Bridge Election in Spanning Tree Protocol
Redundant links are used to provide a backup path when one link goes down but a Redundant link can sometimes cause switching loops. The main purpose of Spanning Tree Protocol (STP) is to ensure that you do not create loops when you have redundant paths in your network. Spanning Tree Protocol (STP) - As IEEE STP is used to make a loop-free network b
4 min read
What is MSTP(Multiple Spanning Tree Protocol)?
The Multiple Spanning Tree Protocol (MSTP) and algorithm, gives both straightforward and full network doled out to any given Virtual LAN (VLAN) all through a Bridged Local Area Network. MSTP employments BPDUs to trade data between spanning-tree consistent gadgets, to avoid circles in each MSTI (Multiple Spanning Tree Instances) and within the CIST
2 min read
Rapid Spanning Tree Protocol
RSTP is the more improved and advanced version of STP which is a layer 2 protocol that prevents bridge loops and broadcast storms in local networks with redundant connections. Rapid spanning tree protocol has faster convergence and it is also backward-compatible with STP. To make sure a loop-free topology, the Rapid Spanning Tree Protocol (RSTP) pr
5 min read
Configuring Spanning Tree Protocol Portfast
Spanning Tree Protocol is a data link layer or layer-2 protocol whose prime objective is to prevent loops in the different network configurations or network topologies. It tracks all the links and closes the redundant ones. It uses the spanning tree algorithm(STA) to create a topology database and then search out the redundant links to disable them
5 min read
Article Tags :