Configure Spanning Tree Protocol to prevent loops and optimize path selection in switched networks.
Step 1: Set the bridge priority to become root bridge Configure this switch as the root bridge by setting a lower bridge priority value.
|
|
Step 2: Configure STP mode and features Enable Rapid Spanning Tree Protocol (RSTP) for faster convergence and configure PortFast for access ports. Portfast will bypass the listening and learning states to reach the forwarding state immediately. It should only be configured on interfaces connected to a single host or switch (this far less common).
|
|
Step 3: Configure per-interface STP settings Set specific STP parameters on trunk and access interfaces.
|
|
Step 4: Configure STP timers (optional) Adjust STP timers for faster convergence in small networks.
|
|
Step 5: Verify STP configuration
|
|
Key Points:
- Lower priority values = higher priority (0 is highest, 65535 is lowest)
- Use multiples of 4096 for priority values
- PortFast should only be enabled on access ports connecting to end devices
- BPDU Guard shuts down ports receiving BPDUs when PortFast is enabled
- Root bridge should be centrally located with highest bandwidth links