🌳 Lab 4.1: Root Bridge Election & Port Role Configuration

Cisco CCNP 350-401 (ENCOR) & 300-410 (ENARSI) Spanning Tree Protocol

STP Fundamentals & Loop Prevention | Password Protected

šŸ”’ Protected

šŸ“‹ Lab Overview

This laboratory exercise focuses on understanding Spanning Tree Protocol (STP) fundamentals, configuring root bridge election, and analyzing port roles in a redundant network topology. You will configure bridge priorities to influence root bridge selection and verify port roles (root port, designated port, blocked port) using Cisco CLI commands.

šŸŽÆ Lab Objectives

šŸ¢ Real-World Scenario

ABC Corporation operates a three-switch network with redundant links to prevent single points of failure. The network requires proper STP configuration to block redundant paths and prevent Layer 2 loops. You will configure bridge priorities to designate SW-A as the root bridge, verify port roles on all switches, and understand the STP convergence process.

šŸ“¦ Equipment & Prerequisites

Hardware Requirements

Equipment Quantity Model/Specification Purpose
Cisco Catalyst Switch 3 Catalyst 2960, 3560, or higher Primary switching platform
Ethernet Cables 4+ Cat5e or Cat6 patch cables Inter-switch connectivity
Console Cable 3 RJ-45 to RS-232 or USB CLI access to switches
Terminal Emulation Software 1 PuTTY, SecureCRT, or Cisco NETLAB Console session management

Software & Knowledge Requirements

🌐 Network Topology

Three-Switch STP Topology with Redundant Links:

Lab 4.1: Three-Switch STP Topology

Figure 1: Three-Switch STP Topology with Redundant Links - Root Bridge (SW-A) with two active links to SW-B and SW-C, STP blocks one link between SW-B and SW-C to prevent loops

āš™ļø Step-by-Step Configuration Guide

1Initial Access & Switch Verification

Step 1.1: Connect to Switch via Console

Switch> enable
Password: (enter enable password)
Switch#

Step 1.2: Verify Basic Configuration

Switch# show running-config | section spanning-tree
Switch# show version
Switch# show spanning-tree
ā„¹ļø Note: Document the MAC address and current priority of each switch. These values are critical for understanding Root Bridge election.

2Configure Switch Hostnames

Step 2.1: Set Hostname on Switch A

configure terminal
hostname SW-A
no logging console
exit
write memory

Step 2.2: Set Hostname on Switch B

configure terminal
hostname SW-B
no logging console
exit
write memory

Step 2.3: Set Hostname on Switch C

configure terminal
hostname SW-C
no logging console
exit
write memory
āœ“ Verification: Prompt should change on each switch to reflect the new hostname.

3Configure Trunk Ports Between Switches

Step 3.1: Configure Trunk Ports on Switch A

configure terminal
interface gi0/1
description Link to SW-B
switchport mode trunk
switchport trunk allowed vlan 1-1005
no shutdown
exit
interface gi0/2
description Link to SW-C
switchport mode trunk
switchport trunk allowed vlan 1-1005
no shutdown
exit
exit

Step 3.2: Configure Trunk Ports on Switch B (Similar)

configure terminal
interface gi0/1
description Link to SW-A
switchport mode trunk
switchport trunk allowed vlan 1-1005
no shutdown
exit
interface gi0/2
description Link to SW-C
switchport mode trunk
switchport trunk allowed vlan 1-1005
no shutdown
exit
exit

Step 3.3: Configure Trunk Ports on Switch C (Similar)

configure terminal
interface gi0/1
description Link to SW-A
switchport mode trunk
switchport trunk allowed vlan 1-1005
no shutdown
exit
interface gi0/2
description Link to SW-B
switchport mode trunk
switchport trunk allowed vlan 1-1005
no shutdown
exit
exit
āœ“ Verification: Run show interfaces trunk on each switch to confirm trunk configuration.

4Configure Spanning Tree Mode (Rapid PVST+)

Step 4.1: Change STP Mode on All Switches

configure terminal
spanning-tree mode rapid-pvst
exit

Step 4.2: Verify Configuration

show spanning-tree summary
ā„¹ļø About RAPID PVST+: This mode provides faster convergence (typically 6 seconds vs 50 seconds for classic STP) and is the industry best practice for modern networks.

5Configure Bridge Priority for Root Bridge Election

Step 5.1: Set Priority on Switch A (Make it Root Bridge)

configure terminal
spanning-tree vlan 1 priority 4096
exit

Step 5.2: Set Priority on Switch B (Secondary Root)

configure terminal
spanning-tree vlan 1 priority 8192
exit

Step 5.3: Set Priority on Switch C

configure terminal
spanning-tree vlan 1 priority 12288
exit
āœ“ Result: STP will immediately recalculate and SW-A should become the new Root Bridge.

6Verify Root Bridge Election & Port Roles

Step 6.1: Check STP Status on All Switches

show spanning-tree vlan 1
show spanning-tree detail

Step 6.2: Expected Output on SW-A (Root Bridge)

Bridge ID Priority 4097 (priority 4096 sys-id-ext 1)
Address aaaa.bbbb.cccc
Root ID Priority 4097
Address aaaa.bbbb.cccc ← Same as Bridge ID (This IS the root)
RootPort — ← No root port on root bridge
Key Observations:
  • Root Bridge has no Root Port
  • Each non-root switch has exactly one Root Port
  • Port states: Forwarding (active) or Discarding (blocked)

āœ… Configuration Verification Commands

Display STP Summary

show spanning-tree summary
(Shows STP mode, root bridge info)

View Detailed STP Information

show spanning-tree vlan 1 detail
(Comprehensive STP topology including port states)

Check Interface STP Status

show spanning-tree interface gi0/1
(Specific interface role and state)

Monitor STP Statistics

show spanning-tree statistics
(BPDU counters and topology change history)

šŸ“‹ Lab Completion Checklist

Configuration Verification

šŸ’” Key Takeaways & Learning Outcomes

šŸ† Best Practices & Security Recommendations

STP Configuration Best Practices

STP Security Best Practices

šŸ”§ Troubleshooting Guide

Issue Cause Solution
Unexpected Root Bridge election Bridge priority not configured or MAC address tie-breaker activated Verify bridge priority values with show spanning-tree
Port stuck in blocking state Port role calculation resulted in blocked port (normal or loop condition) Verify topology with show spanning-tree detail and physical cable connections
No Root Port on non-root switch Switch is incorrectly acting as root or BPDU reception issue Check bridge priority configuration and BPDU reception on all ports
Slow convergence after topology change STP mode set to classic instead of Rapid PVST+ Configure spanning-tree mode rapid-pvst and reload if necessary
āœ“ Lab Completion Indicator: You have successfully completed Lab 4.1 when you can explain Root Bridge election, identify port roles in a three-switch topology, understand bridge priority influence, and verify STP configuration using CLI commands.