Spanning-Tree VLAN Priority – Multiple VLAN Configuration

ciscoswitchvlan

I have multiple VLAN on switch but i want to make my switch as root for vlan200 only and rest will be secondary but i am confused in following two method

I want to set following SW1

vlan 200     - 24576
vlan 100,300 - 36864

Should i use following, but in following command how do i tell vlan 100 and 300 use priority 36864 ??

SW1#spanning-tree vlan 200 priority 24576

Or

should I use following?

SW1#spanning-tree vlan 201 root primary
SW1#spanning-tree vlan 100,300 root secondary

Best Answer

To achieve the priorities you want, you can do the following

SW1#spanning-tree vlan 200 priority 24576

SW1#spanning-tree vlan 100 priority 36864

SW1#spanning-tree vlan 300 priority 36864

What this will do, is make SW1 the root bridge for vlan 200 providing the current root bridge is above this value or using the default value on 32768.

Since you are setting vlan 100 and 300, above the default value of 32786, SW1 will become least likely the root bridge for those two vlan's.

The command

SW1#spanning-tree vlan 201 root primary

Will make SW1, the root bridge for vlan 201. This command basically sets the lowest priority it needs, to become the root bridge. Remember, the lower the priority, the more likely the switch becomes the root bridge.

The command

SW1#spanning-tree vlan 201 root secondary

will change the switch's priority, just low enough, without becoming the root bridge, in turn making it the root bridge, should the primary root bridge fail.

Please also keep in mind that all the effects described are dependent on using the default values.

Hope this helps you on your quest.

SleepyMan