Professional Documents
Culture Documents
Spanning Tree Protocol
Spanning Tree Protocol
Spanning Tree Protocol
PROTOCOL
WHAT IS STP
• Spanning Tree Protocol (STP) is a Layer 2 network protocol used to
prevent looping within a network topology
• . STP was created to avoid the problems that arise when computers
exchange data on a local area network (LAN) that contains redundant
paths.
• AND SOME OF THESE PROBLEMS ARE REDUNDANT LINKS ,
BROADCAST STORMS, NETWORK CONGESTION AND DATA
REDUNDANCY
• IT IS Based on an algorithm created by American computer scientist
Radia Perlman
Why do we need STP?
• STP can help prevent bridge looping on LANs that include redundant links.
Without STP, it would be difficult to implement that redundancy and still
avoid network looping. STP monitors all network links, identifies redundant
connections and disables the ports that can lead to looping.
•STP blocks some ports on switches with redundant links to prevent broadcast
storms and ensure a loop-free logical topology. With STP in place, you can
have redundant links between switches in order to provide redundancy.
•A broadcast storm is an abnormally high number of broadcast packets within
a short period of time. They can overwhelm switches and endpoints as they
struggle to keep up with processing the flood of packets.
•Network congestion occurs when a network is overrun with more data packet
•traffic than it can cope with. This backup of data traffic occurs when too many
communication and data requests are made at the same time, over a network
that doesn't have enough network bandwidth to carry it.
How a Spanning Tree Protocol (STP) works
• Spanning Tree Protocol (STP) prevents the looping of the frame by putting the
interfaces of the switch in either forwarding or blocking state.
• For us to continue we must know some terms first
• BPDU messages contain information such as the switch's identity, the port on which the message was
sent, and the cost of sending data through that port. The cost is used by the STP algorithm to
determine the shortest path to the root bridge in the network and to prevent loops from forming.
• BPDU messages are also used to elect a root bridge in the network. The root bridge is the switch that
has the lowest bridge ID, and it is responsible for forwarding all traffic in the network. All other
switches in the network determine their position relative to the root bridge based on the information
in the BPDU messages they receive.
• By exchanging BPDU messages, switches in the network are able to create a loop-free topology and
ensure the efficient forwarding of traffic.
Cont…..
• In addition to detecting loops and electing a root bridge, BPDU messages also play a role in detecting
and handling failures in the network. When a switch detects a failure or a change in the network
topology, it sends out BPDU messages to inform other switches of the change. This triggers the STP
algorithm to re-calculate the shortest path to the root bridge and reconfigure the network accordingly.
• BPDU messages also help prevent network disruptions caused by the insertion of unauthorized switches
or devices into the network. When a switch receives a BPDU message from another switch, it can verify
the identity of the sending switch using the bridge ID and other information in the message. If the
sending switch is not authorized to be part of the network, the receiving switch can take action to block
its ports and prevent it from causing disruptions.
• Overall, BPDU messages are a critical component of network infrastructure that help ensure the
stability, reliability, and security of network operations. They enable switches to communicate with each
other, detect and prevent network loops, elect a root bridge, and respond to changes and failures in the
network topology.
CONT.
• BPDU is a message used by switches to exchange information
about the network topology and to negotiate which links should
be active or blocked to prevent loops. It contains information
such as the switch ID, priority, and path cost to the root bridge.
• BPDUs are a critical component of STP and are used by
switches to communicate with each other to create a loop-free
network topology.
Types of STP
There are several types of STP, including:
The original version of STP.
•Rapid Spanning Tree Protocol (RSTP): A faster version of STP that provides faster convergence
times.
•Multiple Spanning Tree Protocol (MSTP): A version of STP that allows multiple spanning trees to be
created, each with its own root bridge.
•Criteria for Spanning Tree:
•The criteria for Spanning Tree include:
•Creating a loop-free network topology.
•Selecting a root bridge as the main reference point for the network topology.
•Selecting the shortest path to the root bridge for each network device.
•Blocking redundant links that would create a loop and activating them if the active link fails.
802.1D(common spanning tree)
• It is a spanning tree standard developed by IEEE which elects only
one root bridge per whole topology. All the traffic flows over the
same path (the best path to the root bridge) but this doesn’t hold
good always as there can be scenarios in which the optimised path to
reach a VLAN is different than the path obtained on electing the root
bridge. It is very slow as it takes 32 seconds to converge.
ADVANTAGES AND DISADVANTAGES
Advantages:
• Advantages:
• PVST+ provides more optimization on the performance of a network than CST as it selects root bridges per
VLAN.
•
• Bandwidth consumption is lesser than CST.
•
• Optimum load balancing is achieved.
• Disadvantages:
• This is slow as CST i.e. convergence time is slow. By default, Cisco switches take 50 seconds for converging.
• More resources (CPU and memory) is required.
802.1w – Rapid Spanning Tree Protocol
(RSTP)
• It is a spanning standard developed by IEEE which provides faster
convergence than CST but holds the same idea of finding a single root
bridge in the topology. The bridge resources needed in RSTP is higher
than CST but less than PVST+
ADVANTAGES
Advantages: