spanning-tree vlan vlan-ID root primary

JJBladesterJJBladester Member Posts: 38 ■■□□□□□□□□
When configuring PVST+ (Per-VLAN Spanning Tree Plus), one can enter the following command to configure a switch to become the root bridge for a specified VLAN.

Switch(config)# spanning-tree vlan vlan-ID root primary

What exactly does the primary operator in this command do? Normally, one would tweak bridge priority values to force BIDs (Bridge IDs) such that their primary and secondary, etc. bridges would be selected not by chance, but by whatever the administrator chooses.

So, is the command polling the other BIDs on the other switches and just setting the BID of this switch to something lower than the lowest existing BID, or is the command doing something else?

What happens if I add another switch to the network with a very low BID... Would the switch I set to be root primary maintain that designation?

Comments

  • hiddenknight821hiddenknight821 Member Posts: 1,209 ■■■■■■□□□□
    If you are reading Odom's book, it mentioned that the spanning-tree vlan vlan-id root primary command would change the current base priority of this switch to 24,576 if the current root of the spanning-tree has a base priority higher than 24,576. If that is not the case, then this switch's base priority would be 4096 less than the current root's base priority if it's 24,576 or lower. If the current root has a priority of 0, then the command on this switch won't be as effective. This will not even force the current root switch to change its priority so that this switch can become the new root bridge. This command doesn't even trigger another bridge's base priority.
  • JJBladesterJJBladester Member Posts: 38 ■■□□□□□□□□
    If you are reading Odom's book, it mentioned that the spanning-tree vlan vlan-id root primary command would change the current base priority of this switch to 24,576 if the current root of the spanning-tree has a base priority higher than 24,576. If that is not the case, then this switch's base priority would be 4096 less than the current root's base priority if it's 24,576 or lower. If the current root has a priority of 0, then the command on this switch won't be as effective. This will not even force the current root switch to change its priority so that this switch can become the new root bridge. This command doesn't even trigger another bridge's base priority.

    From your reply, I gather this is a command worth staying away from, in favor of manually configuring priority values on the necessary switches. Do you agree? Perhaps in a small and relatively unchanging network, this command may be okay since the introduction of a bunch of new switches in the network would be unlikely/infrequent.
  • SharkDiverSharkDiver Member Posts: 844
    I think it all depends on the network.

    If you had a newly installed network of switches, and you knew that they were all at defaults, then the spanning-tree vlan vlan-id root primary and the spanning-tree vlan vlan-id root secondary commands would be the simplest, quickest way to get the job done.

    In a big existing network, it may not be the best way.
  • SharkDiverSharkDiver Member Posts: 844
    Obviously, if you were to add a new switch to an existing network, you could create a problem whether the above commands were used or if you set them manually (but not low enough).
  • fadhilfadhil Member Posts: 200
    this command spanning-tree vlan vlan-ID root primary sets the switch to become root for a given VLAN. It works by lowering the priority of the switch until it becomes root. Once the switch is root, it will not prevent any other switch from becoming root.
Sign In or Register to comment.