Spanning Tree Protocol (STP) is essential in preventing network loops in a Layer 2 topology. Rapid Per VLAN Spanning Tree Plus (Rapid PVST+) enhances convergence times compared to traditional STP and operates per VLAN, improving efficiency in VLAN-based environments.
PortFast is an STP enhancement that allows access ports (connected to end devices like PCs) to bypass the listening and learning states, transitioning directly to the forwarding state. This is particularly useful for minimizing delay during device boot-up.
STP
- Configure STP mode PVST on a Cisco Switch
- Configure STP mode Rapid PVST on a Cisco Switch
- Configure STP mode Rapid PVST with PortFast on a Cisco Switch
Use Case
In this topology, we aim to:
- Configure Rapid PVST on three Cisco switches (S1, S2, and S3).
- Enable PortFast on interfaces connecting to PCs (Fa0/1 and Fa0/2 on S3).
This configuration ensures:
- Rapid convergence of the STP process across the network.
- Direct transition to the forwarding state on access ports, improving connectivity times for end devices (PC1 and PC2).
Network Topology
The topology consists of three switches (S1, S2, and S3) interconnected via GigabitEthernet ports (Gig0/1 and Gig0/2). Two PCs (PC1 and PC2) are connected to FastEthernet interfaces (Fa0/1 and Fa0/2) on switch S3.
Configuration Steps
1. Configure Rapid PVST on Switches
Rapid PVST must be enabled globally on all switches to allow faster STP convergence.
For each switch (S1, S2, S3), follow these steps:
- Enter privileged EXEC mode:
- Enter global configuration mode:
- Set the hostname for the switch:
Example:
- Enable Rapid PVST:
2. Enable PortFast on Access Ports
PortFast should only be enabled on interfaces connected to end devices (e.g., PCs). On S3, configure PortFast on interfaces Fa0/1 and Fa0/2:
- Enter the interface configuration mode for each port:
- Enable PortFast:
- Exit the interface configuration mode:
- Repeat the above steps for Fa0/2:
Final Configuration
- Switch S1 Configuration
- Switch S2 Configuration
- Switch S3 Configuration
Verification Commands
- Verify the spanning-tree mode:
Look for the mode set as
rapid-pvst
. - Check PortFast status on specific interfaces:
Verify the
spanning-tree portfast
configuration. - Confirm that all ports are in the forwarding state:
Conclusion
By enabling Rapid PVST with PortFast, the network is optimized for faster convergence and reduced latency for connected devices. This configuration ensures stability and efficiency, particularly in VLAN-based topologies.