Smart city fiber optic infrastructure
Urban surveillance and traffic monitoring fiber solutions

Core Switch STP Configuration

Core Switch STP Configuration

To configure STP on a core switch, enable STP, set the switch as the root bridge, adjust priorities, and verify the topology to ensure loop-free Layer 2 operation.Step 1: Enable STPSTP is typically enabled by default on Cisco switches, but you can explicitly enable it in global configuration mode. Choose the STP mode based on your network requirements:STP (802.1D): Classic spanning tree, slower convergence.RSTP (802.1w): Rapid Spanning Tree, faster convergence, usually default.MSTP (802.1s): Multiple Spanning Tree, supports multiple VLANs . Example command to enable RSTP:CodeCopySwitch(config)# spanning-tree mode rapid-pvst Step 2: Set the Core Switch as Root BridgeThe root bridge is the logical center of the STP topology. On a core switch, you should manually configure it as the root to optimize traffic flow and avoid suboptimal paths . For VLAN 1, set the core switch as the primary root:CodeCopySwitch(config)# spanning-tree vlan 1 root primary Optionally, configure a secondary root on another switch for redundancy:CodeCopySwitch(config)# spanning-tree vlan 1 root secondary Step 3: Adjust STP Priority (Optional)STP uses a bridge priority (0–61440 in increments of 4096) to elect the root bridge. Lower values increase the likelihood of being elected root. Example:CodeCopySwitch(config)# spanning-tree vlan 1 priority 4096 This ensures the core switch is preferred over older or lower-bandwidth switches .Step 4: Configure Port Costs and Hello Time (Optional)You can fine-tune STP by adjusting port path costs and Hello message intervals:CodeCopySwitch(config)# spanning-tree vlan 1 cost 19Switch(config)# spanning-tree vlan 1 hello-time 2 Cost: Influences path selection; lower cost preferred.Hello time: Frequency of BPDU messages; default is 2 seconds .Step 5: Verify STP ConfigurationUse the following commands to confirm STP operation and root bridge election:CodeCopySwitch# show spanning-treeSwitch# show spanning-tree rootSwitch# show spanning-tree vlan 1 Check that the core switch is the root bridge and that ports are in the correct roles (Root, Designated, or Blocking), .Best PracticesAlways configure the core switch as root to optimize traffic.Use secondary root for redundancy.Avoid default priorities on older switches to prevent suboptimal root election.Monitor STP with show spanning-tree regularly to detect topology changes or blocked ports . By following these steps, your core switch will be properly configured for STP, ensuring a loop-free, resilient Layer 2 network.

May 16, 2026

Spanning Tree Priority: Root Primary and Root Secondary

Based on the diagram above, we need to manually configure the core switch as the root bridge as they have higher bandwidth and better features in general as compared to the other switches on the group.

Apr 15, 2026

How to Configure a Cisco Switch (step by step)

If you''re looking to configure a switch for the first time, this post is for you. Learn step-by-step configuration commands for Cisco IOS Switches.

Feb 13, 2026

Layer 2/3

Restrictions for STP An attempt to configure a switch as the root switch fails if the value necessary to be the root switch is less than 1. If your network consists of

Feb 08, 2026

6 Common Spanning Tree Mistakes and How to Avoid

This is the wrong solution. The right solution is to configure a feature called PortFast on Cisco switches. (Most switch vendors have a similar feature.)

Dec 27, 2025

Cisco Spanning Tree Protocol Guide (STP Examples and Configuration)

We will focus on Spanning Tree Protocol (STP) configuration and verification commands in this tutorial, as implemented on Cisco switches. Figure 1 shows the topology with three Cisco Catalyst 3550

Apr 22, 2026

FOR ARAKNIS NETWORKS EQUIPMENT

1 - Find, Fix, and Prevent STP Issues Note – This guide assumes that all STP settings in the LAN have been left default. Also, you must have a managed switch installed as the core switch in order to

Sep 14, 2025

Switch STP Configuration | Network as Code

This configuration establishes loop prevention mechanisms using “stp” settings with “rstp” (true/false) for enabling Rapid Spanning Tree Protocol and “stp_bridge_priority” arrays containing “stacks”

Jun 22, 2026

Understand and Mitigate Network Loops (STP)

Configure RSTP to Prioritize Core Switches: Configure Spanning Tree Protocol settings to prioritize core switches. Setting STP priorities properly ensures that the most reliable switch is the root switch. This

Oct 24, 2025

Layer 2 Configuration Guide, Cisco IOS XE 17.18.x (Catalyst 9300

This chapter describes how to configure the Spanning Tree Protocol (STP) on port-based VLANs on the Cisco Catalyst Switches.

Jun 16, 2026

Configure STP Settings on a Switch through the CLI

Article ID:5760 Configure STP Settings on a Switch through the CLI Objective Spanning Tree Protocol (STP) protects Layer 2 broadcast domains from broadcast storms by selectively

Dec 27, 2025

How to set up STP on HP Switches

Setting up Spanning Tree on HP switches is really easy, after you''ve done it a couple of times, but getting it configured can seem like a daunting task for beginners, esp. in a production

Dec 08, 2025

How to Configure Spanning Tree Protocol (STP) on Cisco Switches

Discover how to configure and optimize Spanning Tree Protocol (STP) on Cisco switches. This guide covers core concepts, Cisco-specific settings, and best practices to prevent loops and keep your

Mar 17, 2026

need configuration details on STP on core, distribution

1. need configuration details on STP on core, distribution and access switch (CX SWITCH) Kudos chandan Posted May 27, 2025 01:16 AM

Jul 27, 2025

Spanning Tree Root Bridge Configuration

This lesson explains how to configure the spanning-tree root bridge on Cisco IOS using root primary/secondary or priority.

Feb 18, 2026

STP Spanning Tree Protocol step by step » CiscoForAll

Incorporates several of Cisco''s STP enhancements and ensures a safe and quick transition to a forwarding state and topology convergence by removing the overdepen­dence on STP timers.

Apr 11, 2026

How to Configure Spanning Tree (STP, RSTP, MSTP)

Learn how to configure spanning tree protocols — STP, RSTP, and MSTP — on Huawei, Cisco, and Juniper switches. Step-by-step commands,

Mar 09, 2026

HA-mode FortiGate units using hardware-switch interfaces and STP

HA-mode FortiGate units using hardware-switch interfaces and STP In most FortiLink topologies, MCLAG or LAG configurations are used for FortiSwitch redundancy. However, some FortiGate

Apr 25, 2026

STP and VLT Setup for Core Switches

The document outlines the configuration of Spanning Tree Protocol (STP) and Virtual Link Trunking (VLT) on core switches in a server room and hub rooms. It

Feb 02, 2026

STP and VLT Setup for Core Switches

STP and VLT Setup for Core Switches The document outlines the configuration of Spanning Tree Protocol (STP) and Virtual Link Trunking (VLT) on core switches

Feb 11, 2026

STP Spanning Tree Protocol step by step » CiscoForAll

STP is enabled by default for all VLANs in a switch. To change the priority to a lower value for root switch elections, use one of the following commands: Switch

Jun 26, 2026

What Is STP?

Configure an optimal core switch as the root bridge to ensure stability of the STP Layer 2 network. Otherwise, new access devices may trigger STP root bridge switching, causing short service

Dec 01, 2025

Distribution & Core layer switch configuration

Hi, I have 6500,4500 & 3500 switches. I want to configure 6500 as core, 4500 as distribution & 3500 as access layer switch for the campus lan. As best pracitce where should i

Mar 26, 2026

Configure Spanning Tree for intervlan routing core

Layer 2 access switch: Netgear GS752TX: configure with vlan 10, 20, 30, 40, 50 trunked to Cisco L3 switch. My question is, what is the correct/proper

Feb 17, 2026

Configure STP Settings on a Switch through the CLI

If different VLANs are associated with different STP instances, then their traffic will be relayed based on the STP port state of their associated MST instances. This results to better bandwidth utilization. This

May 14, 2026

How to set up STP on HP Switches – HP Networking

Then enter “spanning-tree” to enable it. That''s all you need to do on a switch to get STP up and running. Next we need to set up root bridge priority

Dec 10, 2025

Configure STP Settings on a Cisco Business Switch through the CLI

This article aims to show you how to configure STP on CBS250 and CBS350 Series Switches using the CLI.

Sep 18, 2025

Solved: STP working on core switches

Hello @yadhukrishna, if the two Nexus 9000 core switches form a vPC pair you should consider the use of the feature under vpc domain peer-switch you will need to configure the same

More industry information

Contact Us

We Look Forward to Working with You

Contact Information

Phone +49 172 6389472
Address Musterstraße 12, 10115 Berlin, Germany

Send an Inquiry