Spanning Tree Protocol (STP) is a Layer 2 protocol essential in Ethernet networks to prevent network loops. Redundant paths in a network can cause:
Broadcast storms: Excessive traffic that floods the network.
Multiple frame copies: Duplication of frames, creating confusion.
MAC table instability: Incorrect MAC address mapping due to looped traffic.
STP ensures there is always a single active path between devices in a network by blocking redundant paths until needed.
II. KEY FEATURES OF TRADITIONAL STP
IEEE Standard: Defined by the IEEE 802.1D specification.
Root Bridge Election: Utilizes Bridge Protocol Data Units (BPDUs) to elect a Root Bridge, which acts as the central reference point in the network topology.
Port States:
Blocking: Prevents loops by not forwarding frames.
Listening: Monitors BPDUs but doesn’t forward traffic.
Learning: Builds MAC address tables without forwarding frames.
Forwarding: Operates normally by forwarding frames.
Disabled: No activity on the port.
Timers:
Hello Time: Interval between BPDU transmissions (default: 2 seconds).
Forward Delay: Time spent in the listening and learning states (default: 15 seconds each).
Max Age: Time before considering a BPDU invalid (default: 20 seconds).
Redundant Path Management: Blocks redundant paths and only activates them when the primary path fails.
III. LIMITATIONS OF TRADITIONAL STP
Convergence Time: Takes 30-50 seconds to stabilize the network after a topology change.
Inefficiency: Redundant links remain blocked, resulting in underutilized bandwidth.
A. Base Topology
B. Configuration Details
Created two Layer 3 VLANs (VLAN 10 and VLAN 20) on LAB-SWITCH-01, making it the Root Bridge for these VLANs.
Configured LAB-SWITCH-02 as the Backup Root Bridge for both VLANs.
Assigned Higher HSRP Priority to LAB-SWITCH-01, ensuring it is the active switch for both VLANs.
Switch Roles:
LAB-SWITCH-01: Root Bridge for VLANs 10 and 20.
LAB-SWITCH-02: Backup Root Bridge for VLANs 10 and 20.
C. Traffic Flow (Layer 2 STP)
Due to STP:
Looped interfaces or redundant links are blocked to prevent Layer 2 loops.
Traffic for VLANs 10 and 20 flows through a single active link, while the second link operates in a standby state.
LAB-SWITCH-01 – Root Bridge for Vlan 10, 20
LAB-SWITCH-02 – Backup Root Bridge for Vlan 10, 20
D. Base Topology – Blocking links
LAB-SWITCH-01: Spanning-Tree status
LAB-SWITCH-02 : Spanning-Tree status
LAB-SWITCH-03 : Spanning-Tree status
LAB-SWITCH-04 : Spanning-Tree status
LAB-SWITCH-01: HSRP Status
LAB-SWITCH-02 : HSRP Status
IV. BUSINESS CHALLENGE
From a business perspective:
Blocking expensive fiber links leads to resource underutilization.
All VLAN traffic passing through a single link increases operational costs and reduces network efficiency.
V. IMPLEMENTED SOLUTION
To optimize resource utilization and enhance network performance, the following solutions were implemented:
Per-VLAN Spanning Tree (PVST)
Configured separate primary and secondary paths for each VLAN to distribute traffic efficiently:
VLAN 10: Uses Link A as its primary path.
VLAN 20: Uses Link B as its primary path.
HSRP Configuration
Increased HSRP priority for VLAN 20 on the secondary switch to ensure smooth traffic flow at both Layer 2 and Layer 3.
To address this issue, we have implemented the following solutions to optimize resource utilization and enhance network performance:
For example, VLAN 10 uses Link A as its primary path, while VLAN 20 uses Link B.
Base Topology : Traffic Flow per Vlan
LAB-SWITCH-01: Spanning-Tree Status
LAB-SWITCH-02: Spanning-Tree Status
LAB-SWITCH-03: Spanning-Tree Status
LAB-SWITCH-04: Spanning-Tree Status
We need to increase the HSRP priority for VLAN 20 on the secondary switch to ensure smooth traffic flow not only at Layer 2 but also at Layer 3
LAB-SWITCH-02: HSRP Status
LAB-SWITCH-01: HSRP Status
VI. CISCO VIRTUAL PORT-CHANNEL (vPC)
Cisco’s Virtual Port-Channel (vPC) is a groundbreaking feature available on Nexus switches. It enables two switches to function as a single logical switch to downstream devices, ensuring high availability, redundancy, and loop-free topologies.
A. Why vPC is Needed?
Traditional Layer 2/Layer 3 designs heavily relied on STP, which has limitations:
Convergence Delays: Topology changes can cause high delays, impacting performance.
B. vPC Advantages
Enables active-active forwarding on multiple links.
Eliminates STP blocking on redundant paths.
Provides faster convergence, ensuring high availability.
C. Key Benefits of vPC
Reduces STP Dependency: Minimizes reliance on STP for loop prevention.
Maximizes Link Utilization: Supports active-active forwarding, using all available links.
Simplifies Network Architecture: Makes dual-homed device configurations straightforward.
Improves Reliability and Performance: Enhances network uptime and efficiency.
D. Base vPC Configuration
1) vPC Peer-Link
A dedicated port-channel between two Nexus switches for synchronization.
2) Downstream Devices
Devices connected to both switches via active-active links, leveraging vPC for optimal bandwidth and redundancy.
LAB-SWITCH-01: vPC status
LAB-SWITCH-02: vPC status
Configuration for the downstream interface connected to the downstream switches
LAB-SWITCH-01
LAB-SWITCH-02
LAB-SWITCH-03 : Active interfaces connected to northbound devices
LAB-SWITCH-04 : Active interfaces connected to northbound devices
LAB-SWITCH-03 : Traffic is passing through both links without any blockage.
LAB-SWITCH-04 : Traffic is passing through both links without any blockage.
Conclusion
With the implementation of PVST and vPC, we addressed inefficiencies in traditional STP by enabling better resource utilization and ensuring a robust, scalable, and high-performing network. By increasing HSRP priority for VLAN 20 on the secondary switch, traffic flow has been optimized at both Layer 2 and Layer 3, enhancing overall network stability and business operations.