Skip to main content

MST - Best Practices for Core and Access Switch Configurations

In this post, we will configure Multiple Spanning Tree (MST), a protocol designed to optimize spanning tree instances by mapping multiple VLANs to fewer instances. This reduces overhead on network devices, enhances scalability, and speeds up convergence. We'll configure MST on both core/root switches and access switches, ensuring that only the required VLANs are active on each switch. The configuration will focus on assigning VLANs to specific MST instances, defining root priorities, and controlling VLAN availability on trunk links between switches.

This setup ensures efficient traffic flow, minimizes network downtime, and improves overall stability. We'll also define MST regions and revision numbers to maintain consistency across the network. By following this guide, you'll optimize spanning tree operations while maintaining flexibility in VLAN creation and deployment across your infrastructure.


Configuration for Core-SW1 (Primary Root for Instance 1)

! Define MST region and name it "MSTRegion1" with revision number 1

core-sw1(config)# spanning-tree mode mst

core-sw1(config)# spanning-tree mst configuration

core-sw1(config-mst)# name MSTRegion1

core-sw1(config-mst)# revision 1

core-sw1(config-mst)# instance 1 vlan 2-50

core-sw1(config-mst)# instance 2 vlan 51-100

core-sw1(config-mst)# exit

 

! Set priorities to define the root for MST instances

core-sw1(config)# spanning-tree mst 1 priority 4096  ! Primary root for instance 1

core-sw1(config)# spanning-tree mst 2 priority 8192  ! Secondary root for instance 2

 

! Save the configuration

core-sw1# write memory


Configuration for Core-SW2 (Primary Root for Instance 2)

! Define MST region and name it "MSTRegion1" with revision number 1

core-sw2(config)# spanning-tree mode mst

core-sw2(config)# spanning-tree mst configuration

core-sw2(config-mst)# name MSTRegion1

core-sw2(config-mst)# revision 1

core-sw2(config-mst)# instance 1 vlan 2-50

core-sw2(config-mst)# instance 2 vlan 51-100

core-sw2(config-mst)# exit

 

! Set priorities to define the root for MST instances

core-sw2(config)# spanning-tree mst 1 priority 8192  ! Secondary root for instance 1

core-sw2(config)# spanning-tree mst 2 priority 4096  ! Primary root for instance 2

 

! Save the configuration

core-sw2# write memory


Configuration for Access Switches

! Define MST region to match the core switches

access-sw(config)# spanning-tree mode mst

access-sw(config)# spanning-tree mst configuration

access-sw(config-mst)# name MSTRegion1

access-sw(config-mst)# revision 1

access-sw(config-mst)# instance 1 vlan 2-50

access-sw(config-mst)# instance 2 vlan 51-100

access-sw(config-mst)# exit

 

! Configure trunk to Core-SW1

access-sw(config)# interface g1/0/1

access-sw(config-if)# switchport mode trunk

access-sw(config-if)# switchport trunk allowed vlan 2-50,51-100

access-sw(config-if)# exit

 

! Configure trunk to Core-SW2

access-sw(config)# interface g1/0/2

access-sw(config-if)# switchport mode trunk

access-sw(config-if)# switchport trunk allowed vlan 2-50,51-100

access-sw(config-if)# exit

 

! Enable PortFast and BPDU Guard on access ports

access-sw(config)# interface range g0/1-24

access-sw(config-if-range)# spanning-tree portfast

access-sw(config-if-range)# spanning-tree bpduguard enable

access-sw(config-if-range)# exit

 

! Example: Allow VLAN 10 on specific access ports

access-sw(config)# interface range g0/5-8

access-sw(config-if-range)# switchport access vlan 10

access-sw(config-if-range)# spanning-tree portfast

access-sw(config-if-range)# exit

 

! Verify MST configuration

access-sw# show spanning-tree mst configuration

! Verify spanning tree status

access-sw# show spanning-tree mst

! Verify trunk status

access-sw# show interface trunk


Comments

Popular posts from this blog

Basic MPLS BGP and L3VPN Lab Setup

In this lab, we’ve set up a basic MPLS, BGP, and L3VPN environment, which is a great foundation for understanding how service providers build scalable networks. The lab uses the EVE-NG simulator along with Router IOS C7200-ADVENTERPRISEK9-M, Version 15.2(4)M8 to emulate a realistic MPLS environment. Below is a summary of the key components and roles of each router in the lab. MPLS Core Routers : The MPLS core consists of the routers responsible for label switching and forwarding customer traffic through the network: PE1 (Provider Edge 1) : Connects customer networks to the MPLS core and handles both MPLS and BGP routing. It also hosts VRF (Virtual Routing and Forwarding) instances for customers. PE2 (Provider Edge 2) : Functions similarly to PE1, connecting another customer network to the MPLS core. P1 (Core Router 1) and P2 (Core Router 2) : These routers serve as MPLS core routers and handle label switching but do not store or process customer routes directly. They simply f

OSPF Adjacency Stuck in EXSTART on Cisco IOS XR – Issue and Solution

In a recent lab setup using Cisco IOS XR on EVE-NG, I faced a common but frustrating issue with OSPF adjacencies getting stuck in the EXSTART state. After spending considerable time troubleshooting interface MTUs and configurations, I discovered that the root cause was related to the virtual network interface type being used. This post outlines the issue, troubleshooting steps, and the eventual solution that got everything working. Issue: While configuring OSPF between two routers running Cisco IOS XR in my lab, OSPF adjacencies were getting stuck in the EXSTART state. I verified that interface configurations, MTU settings, and OSPF parameters were correct, but the problem persisted. I tried adjusting the MTU size, using the mtu-ignore command, and even checked for ACLs, but nothing seemed to resolve the issue. Troubleshooting Steps: MTU Settings: I started by verifying that both sides of the OSPF adjacency had matching MTUs. I used the default MTU and even tried different values wit

How to Properly Clone an EVE-NG Lab with Configurations

Cloning labs in EVE-NG is a great way to duplicate setups and expand or experiment on a new copy without affecting the original lab. However, if not done correctly, the cloned lab may only copy the topology without configurations. In this guide, I’ll show you how to properly clone a lab in EVE-NG with all configurations using the EVE-NG GUI . Follow these steps to ensure that both the topology and router configurations are retained when cloning your lab. Steps to Clone an EVE-NG Lab with Configurations Save Running Configuration on All Devices In your original lab, make sure all devices have their configurations saved to NVRAM. Go into the CLI of each router and run the command: copy running-config startup-config Export All Configurations (CFGs) On the left sidebar in the EVE-NG Web UI , click on the "More Actions" option. Then select "Export all CFGs" . This step exports the configurations of all devices in the lab. Shutdown All Devices After exporting the confi