How to set root bridge for all vlans with IOS switch

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.

Reply to
Loading thread data ...

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.

Reply to

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 ??

Reply to

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.

Reply to
BW Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.