MST Multiple Spanning Tree Interface Cost & Priority Tuning

The spanning tree mode, MST, can also tweak its interface cost and tune its priority, like a common spanning tree. With this feature, load balancing can be established by priority tuning, and the interface cost shall define the path to the root switch.

 

MST Spanning Tree Interface Cost

Multiple Spanning Tree protocol supports port cost tuning and interface priority by using the interface command ‘spanning-tree mst <instance-number> cost <cost>’ wherein the cost establishes the interface cost. Using the sample topology below, let us check the interface cost of Switch 1, the root bridge, which is also the internal spanning-tree instance. It has the default spanning tree instance cost of 0.

mst spanning tree

 

First, let us first verify the default interface cost of the MST configuration using the ‘show spanning-tree mst <instance number>’ command. The command is also used to check both single spanning-tree instance and Multiple Spanning Tree instances.

SW3# show spanning-tree mst 0
! Output omitted for brevity
Interface              Role      Sts     Cost    Prio.Nbr  Type
---------------- ---- --- --------- -------- --------------------
Gi1/0/1                Root      FWD     20000     128.1    P2p
Gi1/0/2                Altn      BLK     20000     128.2    P2p
Gi1/0/5                Desg      FWD     20000     128.5    P2p

 

Now, we configure the interface cost for Gi1/0/1 to a cost of 1. Notice upon verification of the MST configuration using the show command that Gi1/0/2 becomes a designated port and changes its state from blocking to forwarding.

SW3# configure term 
Enter configuration commands, one per line. End with CNTL/Z. 
SW3(config)# interface gi1/0/1 
SW3(config-if)# spanning-tree mst 0 cost 1

SW3# show spanning-tree mst 0
! Output omitted for brevity
Interface              Role      Sts     Cost    Prio.Nbr  Type
---------------- ---- --- --------- -------- --------------------
Gi1/0/1                Root      FWD         1     128.1    P2p
Gi1/0/2                Desg      FWD     20000     128.2    P2p
Gi1/0/5                Desg      FWD     20000     128.5    P2p

 

You can see the changes incurred in the diagram below. We can now forward traffic out of the Gi1/0/2 interface on Sw3.

MST Interface Cost

 

MST Interface Priority

We can also change the interface priority value of our MST spanning-tree instances with the ‘spanning-tree mst <instance-number> port-priority <priority>’, where priority establishes the port priority.

Using the same show command, we initially check the priority number for each port in the multiple spanning-tree instance in SW4. It can be seen that the root bridge is connected in Gi1/0/2.

SW4# show spanning-tree mst 0
! Output omitted for brevity
Interface              Role      Sts     Cost    Prio.Nbr  Type
---------------- ---- --- --------- -------- --------------------
Gi1/0/2                Root      FWD     20000     128.2    P2p
Gi1/0/5                Desg      FWD     20000     128.5    P2p
Gi1/0/6                Desg      FWD     20000     128.6    P2p

 

Now, let’s configure the MST priority of Gi1/0/5 to a value of 32.

SW4# configure term
Enter configuration commands, one per line. End with CNTL/Z.
SW3(config)# interface gi1/0/5
SW3(config-if)# spanning-tree mst 0 port-priority 32

 

As a result, the priority value of the Gi1/0/5 interface became lower and more preferred.

SW3# show spanning-tree mst 0
! Output omitted for brevity
Interface              Role      Sts     Cost    Prio.Nbr  Type
---------------- ---- --- --------- -------- --------------------
Gi1/0/2                Root      FWD     20000     128.2    P2p
Gi1/0/5                Desg      FWD     20000      32.5    P2p
Gi1/0/6                Desg      FWD     20000     128.6    P2p

Download our Free CCNA Study Guide PDF for complete notes on all the CCNA 200-301 exam topics in one book.

We recommend the Cisco CCNA Gold Bootcamp as your main CCNA training course. It’s the highest rated Cisco course online with an average rating of 4.8 from over 30,000 public reviews and is the gold standard in CCNA training: