How to set root bridge for all vlans with IOS switch

Have a question or want to start a discussion? Post it! No Registration Necessary.  Now with pictures!

Threaded View
Is there a way to set a switch to be root for all vlans simultaneously with
an IOS based switch?  If so, what is the command?  I've tried using 1-x with
the

spanning-tree vlan root primary command, but it doesn not recognize the vlan
range.  For instance, I've defined vlans 2-10 in a vtp domain & I want to
set a particular switch to be primary for all vlans under pvst+ without
having to enter 9 separate commands.



Re: How to set root bridge for all vlans with IOS switch
I gather you mean how to set a switch as the root for span tree?

spanning-tree vlan 1-6,11,101-106 priority 4096

1-6,11,101,106 are all the VLANs to lower the bridge priority. All other
VLANs remain at default priority (32768).
4096 is generally used as the root switch priority. Lower priority is
preferred over higher.


Quoted text here. Click to load it



Re: How to set root bridge for all vlans with IOS switch
Hmm are you defining those vlans in your command??

spanning-tree vlan 2-10 root primary

What error does it give you when you try that?

What do you get when you do a show spanning-tree ??


Quoted text here. Click to load it



Re: How to set root bridge for all vlans with IOS switch
AFRO wrote:

Quoted text here. Click to load it

With vlans 1 - 5 defined I enter:
spanning-tree vlan 1-5 (with and without spaces) root primary

I get "invalid input detected at" pointing at the vlan range.

If I enter each one individually it works properly.

Show spanning-tree gives proper results for vlans 1 - 5.  The IOS version I
am running is 12.1(11)EA1a.
Maybe it's just a flaw in this particular IOS.

Site Timeline