cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6780
Views
5
Helpful
2
Replies

spaning-tree vlan id root primary command

sarahr202
Level 5
Level 5

Hi everybody

My book says if we configure Spanning-tree vlan 1 root primary on a switch, then switch will do the following:

If current's root priority is more than 24,576, then switch will set its priority to 24,576

   OR

If the current's root priority is less than 24,576, then the switch will set its priority as 

Current' root priority -4096.

=============================================================================

When I put the above claim to test, I found totally different results. Below is my simple lab set up.

   Sw1--------sw2

Both switches are using default setting with normal system id i.e they are not using extended system id.  We will change sw1's priority and use spanning-tree vlan 1 root 1 primary on sw2 frequently.

Sw1 is the root bridge with priority 32768.

sw2#show spanning-tree

VLAN1 is executing the ieee compatible Spanning Tree protocol

  Bridge Identifier has priority 32768, address c001.0408.0000

  Configured hello time 2, max age 20, forward delay 15

  Current root has priority 32768, address c000.0408.0000

  Root port is 43 (FastEthernet1/2), cost of root path is 19

Next we configure spanning-tree vlan 1 root on sw2

sw2(config)#spanning-tree vlan 1 root primary

VLAN 1 bridge priority set to 8192

VLAN 1 bridge max aging time unchanged at 20

VLAN 1 bridge hello time unchanged at 2

VLAN 1 bridge forward delay unchanged at 15

Sw2 changes its priority for vlan 1 as 8192.

Next we remove the command spanning-tree vlan 1 root primary on sw2 .

sw2(config)#no spanning-tree vlan 1 root primary

VLAN 1 bridge priority set to 32768

VLAN 1 bridge max aging time unchanged at 20

VLAN 1 bridge hello time unchanged at 2

VLAN 1 bridge forward delay unchanged at 15

Sw2 reverts to its original state.

=====================================================================

Next we  change sw1's priority as:

sw1(config)#spanning-tree vlan 1 priority 25000

sw1(config)#end

sw2#show spanning-tree

VLAN1 is executing the ieee compatible Spanning Tree protocol

  Bridge Identifier has priority 32768, address c001.0408.0000

  Configured hello time 2, max age 20, forward delay 15

  Current root has priority 25000, address c000.0408.0000

Sw1 is a root.

Next we use spanning-tree vlan 1 root primary on sw2 again

w2(config)#spanning-tree vlan 1 root primary

VLAN 1 bridge priority set to 8192

VLAN 1 bridge max aging time unchanged at 20

VLAN 1 bridge hello time unchanged at 2

VLAN 1 bridge forward delay unchanged at 15

Sw2 sets its priority to 8192.

We remove the command spanning-tree vlan 1 root primary on sw2 to revert it to its original setting.

Next we configure the sw1 's priority at 8192

sw2#show spanning-tree

VLAN1 is executing the ieee compatible Spanning Tree protocol

  Bridge Identifier has priority 32768, address c001.0408.0000

  Configured hello time 2, max age 20, forward delay 15

Current root has priority 8192, address c000.0408.0000

Sw1 is the root.

Next we use the command again on sw2 :

sw2(config)#spanning-tree vlan 1 root primary

VLAN 1 bridge priority set to 8191

VLAN 1 bridge max aging time unchanged at 20

VLAN 1 bridge hello time unchanged at 2

VLAN 1 bridge forward delay unchanged at 15

This time sw2 changes its priority to 8191.

========================================================

This is what I found based on the above lab:

1) When the command spanning-tree vlan 1 root primary is used on a switch, it will always make that the sw root by setting its priority to 8192 if the current root 's priority is above 8192. If the current's root priority is less or equal to 8192, then sw will set its priority as :

Current's root priority-1

Am I right or  my little brain playing tricks on me?

Is my book wrong ?

Thanks and have a great day.

2 Accepted Solutions

Accepted Solutions

Hello Sarahr202,

Please take a look on the following link:

http://www.cisco.com/en/US/docs/switches/lan/catalyst2950/software/release/12.1_9_ea1/configuration/guide/swstp.html#wp1039614

This is just an example on 2950 catalyst switch. Before 12.1(9)EA1 entering the spanning-tree vlan vlan-id root

global  configuration command on a Catalyst 2950 switch (no extended system ID)  caused it to set its own switch priority for the specified VLAN to 8192  if this value caused this switch to become the root for the specified  VLAN. If any root switch for the specified VLAN has a switch priority  lower than 8192, the switch sets its own priority for the specified VLAN  to 1 less than the lowest switch priority.

On the following link:

http://www.cisco.com/en/US/docs/switches/lan/catalyst4500/12.1/8aew/configuration/guide/spantree.pdf

On page 13 you may see that for Catalyst 4006 switch with Supervisor Engine III it will change it directly to 8192.

It depends on the IOS version and on the settings of the switches.

HTH,

Alex

View solution in original post

acampbell
VIP Alumni
VIP Alumni

Hi,

Your book was correct for older IOS before the

spanning-tree extend system-id  was introduced

This changed the number system MAC addresses fro a max of 64 to 1024

However as ths allows many more VLANS to be configure new

strict rules re bridge prioities came ino force

You now use miultiples of 4096

spanning-tree vlan id root primary uses 8192 unless a bridge is already configure with this, then

the root primary command will reduce by 1

So you lab seems to be working correctly.

Regards,
Alex.
Please rate useful posts.

Regards, Alex. Please rate useful posts.

View solution in original post

2 Replies 2

Hello Sarahr202,

Please take a look on the following link:

http://www.cisco.com/en/US/docs/switches/lan/catalyst2950/software/release/12.1_9_ea1/configuration/guide/swstp.html#wp1039614

This is just an example on 2950 catalyst switch. Before 12.1(9)EA1 entering the spanning-tree vlan vlan-id root

global  configuration command on a Catalyst 2950 switch (no extended system ID)  caused it to set its own switch priority for the specified VLAN to 8192  if this value caused this switch to become the root for the specified  VLAN. If any root switch for the specified VLAN has a switch priority  lower than 8192, the switch sets its own priority for the specified VLAN  to 1 less than the lowest switch priority.

On the following link:

http://www.cisco.com/en/US/docs/switches/lan/catalyst4500/12.1/8aew/configuration/guide/spantree.pdf

On page 13 you may see that for Catalyst 4006 switch with Supervisor Engine III it will change it directly to 8192.

It depends on the IOS version and on the settings of the switches.

HTH,

Alex

acampbell
VIP Alumni
VIP Alumni

Hi,

Your book was correct for older IOS before the

spanning-tree extend system-id  was introduced

This changed the number system MAC addresses fro a max of 64 to 1024

However as ths allows many more VLANS to be configure new

strict rules re bridge prioities came ino force

You now use miultiples of 4096

spanning-tree vlan id root primary uses 8192 unless a bridge is already configure with this, then

the root primary command will reduce by 1

So you lab seems to be working correctly.

Regards,
Alex.
Please rate useful posts.

Regards, Alex. Please rate useful posts.
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card