In this article, I am going to discuss about How to configure Spanning Tree Protocol Root Primary and Root Secondary so keep reading this article till the end you willl get to know much more about this.

For a VLAN we have to select a Root Switch among all switches.  We can make a switch as Spanning Tree Protocol Root Switch by configuring it. We can use some commands for this purpose. The following   Commands from Global Configuration Mode can be used for configuring the switch for making it as a Root Switch:

spanning-tree vlan <vlan id> root

For each VLAN, the root bridge’s Switch Priority Value is checked by the IOS when we enter the command  “spanning-tree vlan <vlan id> root”. The Spanning Tree Priority Value will be configured as 24576 by the IOS if all the switches presented in the VLAN shows the same default priority. The switch will automatically set its own Switch priority value for a particular VLAN to 4096 if the Switch Priority Value of any particular VLAN’s Root Bridge is lower than  24576. This value is less than that the lowest Switch Priority Value of Spanning Tree.

Now we can configure a switch as a root switch. This process is accomplished in the steps given below. Here, we use a command “spanning-tree vlan <vlan id> root primary” for the root switch configuration.  This configuration includes the following steps:


#configure terminal

#spanning-tree vlan 1 root primary



Here, the third step is the configuration step. Where the id of the VLAN is 1. This configuration is the configuration of the switch as a primary switch(primary candidate) for a particular Root Switch(Root Bridge).

Like, we can also configure a switch as a secondary member for a particular Root Switch. It can be accomplished by using the following command:

spanning-tree vlan <vlan id> root secondary

The only change in this command is that the word primary changes to secondary. All others are the same as in the above configuration of the switch as a primary candidate.

Following is an example for configuring a switch as a secondary :


#configure terminal

#spanning-tree vlan 1 root secondary



The changed priority value can be shown by using the show command of Cisco IOS. This command is, “show spanning-tree”.

For example,

#show spanning-tree


Spanning tree enabled protocol ieee

Root ID    Priority    24577

Address 000A.F379.A66C

This bridge is the root.

Hello  Time  4 sec,  Max Age 40 sec,  Forward Delay 30 sec.

Bridge ID  Priority    24577

Address 000A.F379.A66C

Hello Time 4 sec,  Max Age 40 sec,  Forward Delay 30 sec.

Aging Time 40.

Interface Cost        Type Priority Number Status    Role
Gi1/1 4 P2p 128.25 FWD Desg
Gi1/2 4 P2p 128.26 FWD Desg


Also Read:

I hope you have understood, How to configure Spanning Tree Protocol Root Primary and Root Secondary.