Pass Any Cisco Exam On Your First Try.
Want to boot your networking career ? This is the chance for you.
Spanning Tree Protocol (STP) is a Layer 2 protocol that prevents network loops in Ethernet networks. It works by creating a loop-free logical topology, ensuring that there is only one active path between any two network nodes. Several versions of STP and related protocols have been developed to enhance the original protocol's performance and capabilities. Here’s an in-depth look at the various types of Layer 2 spanning tree protocols:
1. Spanning Tree Protocol (STP) - IEEE 802.1D
Introduction:
STP was the original protocol introduced by IEEE to prevent loops in Ethernet networks.
Defined in the IEEE 802.1D standard.
Operation:
STP elects a root bridge, which is the central reference point for all path calculations.
All other switches identify the shortest path to the root bridge using the bridge protocol data units (BPDUs).
Non-root bridges select a single root port (the port with the least cost to the root bridge) and one designated port for each network segment.
Ports that do not serve as root or designated ports are placed in a blocking state to prevent loops.
States:
Blocking: No data is sent or received, but BPDUs are listened to.
Listening: The port prepares to forward data but does not yet.
Learning: The port starts to learn MAC addresses but still does not forward data.
Forwarding: The port forwards data and continues to learn MAC addresses.
Disabled: The port is turned off and does not participate in STP.
Convergence Time:
Standard STP can take 30 to 50 seconds to converge because it moves through the blocking, listening, learning, and forwarding states.
2. Rapid Spanning Tree Protocol (RSTP) - IEEE 802.1w
Introduction:
An enhancement of the original STP.
Defined in the IEEE 802.1w standard.
Improvements:
Faster convergence (in the range of a few seconds) compared to the original STP.
Introduces new port roles and states for better performance.
Port Roles:
Root Port (RP): The port that provides the best path to the root bridge.
Designated Port (DP): The port that forwards frames to and from a specific network segment.
Alternate Port: A backup for the root port.
Backup Port: A backup for the designated port on the same segment.
Port States:
Discarding: Combines the blocking and listening states from STP.
Learning: The port learns MAC addresses.
Forwarding: The port forwards data frames.
Operation:
RSTP uses a handshake mechanism instead of timers to quickly transition ports to the forwarding state.
BPDUs are used more efficiently, allowing for rapid detection of topology changes.
3. Multiple Spanning Tree Protocol (MSTP) - IEEE 802.1s
Introduction:
MSTP is designed to improve the scalability of STP in large networks.
Defined in the IEEE 802.1s standard.
Operation:
Allows multiple VLANs to be mapped to a single spanning tree instance, reducing the number of spanning tree instances required.
This reduces the CPU and memory load on switches.
Features:
Region Concept: MSTP introduces the concept of regions. A region is a group of switches with the same MST configuration.
MST Instances (MSTIs): Within a region, multiple MSTIs can be defined. Each MSTI operates independently of others.
Advantages:
Provides better load balancing by allowing traffic from different VLANs to use different paths.
Reduces the number of BPDUs in the network since fewer spanning tree instances are needed.
4. Per-VLAN Spanning Tree Protocol (PVST) and PVST+
Introduction:
Proprietary protocols developed by Cisco.
PVST is based on the original IEEE 802.1D standard, while PVST+ extends it to support IEEE 802.1Q VLAN tagging.
Operation:
PVST and PVST+ maintain a separate spanning tree instance for each VLAN.
Each VLAN can have a different root bridge and a different topology.
Advantages:
Provides optimal load balancing as each VLAN can have a unique spanning tree topology.
Allows for fine-tuned control over network traffic and path selection.
Disadvantages:
Increased CPU and memory requirements on switches due to maintaining multiple spanning tree instances.
Can become complex to manage in large networks.
5. Rapid Per-VLAN Spanning Tree Protocol (RPVST+)
Introduction:
Another Cisco proprietary protocol.
Combines the benefits of RSTP and PVST+.
Operation:
Maintains a separate RSTP instance for each VLAN.
Offers the rapid convergence benefits of RSTP while maintaining per-VLAN topologies.
Advantages:
Fast convergence and optimal load balancing for each VLAN.
Enhanced performance and stability compared to PVST+.
6. Shortest Path Bridging (SPB) - IEEE 802.1aq
Introduction:
A modern alternative to traditional spanning tree protocols.
Defined in the IEEE 802.1aq standard.
Operation:
Uses IS-IS routing protocol to compute shortest path trees.
Supports both Layer 2 and Layer 3 services.
Features:
MAC-in-MAC Encapsulation: Encapsulates Ethernet frames within other Ethernet frames for better scalability and management.
Multiple Equal-Cost Paths: Allows multiple equal-cost paths for load balancing.
Advantages:
Provides faster convergence and more efficient use of network resources.
Supports larger and more complex network topologies compared to traditional spanning tree protocols.
Summary
Spanning tree protocols have evolved significantly since the introduction of the original STP. Each version and enhancement addresses specific limitations of its predecessors, aiming to improve convergence times, network stability, scalability, and performance. Here is a quick summary:
STP (IEEE 802.1D): The original protocol with longer convergence times.
RSTP (IEEE 802.1w): Faster convergence and enhanced port roles.
MSTP (IEEE 802.1s): Scalability and efficiency in large networks with multiple VLANs.
PVST and PVST+: Per-VLAN spanning trees with better load balancing.
RPVST+: Combines RSTP’s rapid convergence with per-VLAN topologies.
SPB (IEEE 802.1aq): Modern protocol with efficient use of network resources and support for larger topologies.
Call me