cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5734
Views
52
Helpful
35
Replies

STP root bridge

tobyyy1979
Level 1
Level 1

Hi,

how can i find out whitch Switch is the root bridge for my network, if i have only access to one switch and this one is not the root bridge?

Thanks in advance

35 Replies 35

ankbhasi
Cisco Employee
Cisco Employee

Hi Friend,

When you issue "sh spanning-tree" command you will get the root bridge mac address for vlans you have in your network.

Then you can follow that mac address issuing "sh mac-address-table address " and find the port on which this mac is learned and then issue "sh cdp nei interface detail" to find the next switch.

Telnet to next switch and follow the same procedure till you see in "sh spanning-tree" bridge id mac address and root id mac address are same.

Yes for this you need to have an access of all the switches and staying at one switch it is not possible to find who is the root bridge till the time you have documented that mac address with switch details.

HTH

Ankur

Hello ,

Looking for some information on this matter.

By whcih command L3 switch makes itself as Root Switch.

Can you pls let me know wht command we use for this activity.

Thanks.

~Akber Mirza.

Hi Akber,

"spanning-tree vlan root" will make the switch root for specified vlan.

Which L3 switch do you have?

HTH

Ankur

*Pls rate all helpfull post

AnkurThanks for the above information.

We have 6509 L3 switch. We have Vlan 1,484&784 configured on this switch.

please see the below info on sh spantree:

VLAN0001

Spanning tree enabled protocol ieee

Root ID Priority 32768

Address 0015.2cf0.6001

This bridge is the root

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32768

Address 0015.2cf0.6001

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Gi2/0/1 Desg FWD 4 128.129 Edge P2p

Gi2/0/2 Desg FWD 4 128.130 Edge P2p

VLAN0484

Spanning tree enabled protocol ieee

Root ID Priority 10

Address 0015.c715.cde3

Cost 3

Port 1665 (Port-channel101)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32768

Address 0015.2cf0.61e4

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Po101 Root FWD 3 128.1665 P2p

VLAN0784

Spanning tree enabled protocol ieee

Root ID Priority 10

Address 0015.c715.cf0f

Cost 3

Port 1665 (Port-channel101)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32768

Address 0015.2cf0.6310

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Po101 Root FWD 3 128.166

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

In my switch Vlan 1 is shutdown and other two vlans are L3 vlans. but as per the above information root bridge is shown only in vlan 1.

can you pls explanin .

~Akber

Hi Akber,

For VLAN 484 and VLAN 784 root mridge mac address is Address 0015.c715.cde3 for vlan 484 and Address 0015.c715.cf0f for vlan 784.

So you can trace this mac address in your network to find which switches have declared themselves as root bridge for these 2 vlans.

Also you can check if there is any priority configured on those switches to become root?

Regards,

Ankur

Hello Ankur,

Thanks for the above information.

Please see belwo the Rott switch status and priority details .

cs102-hy2> (enable) sh spantree summary

Spanning tree mode: RAPID-PVST+

Runtime MAC address reduction: disabled

Configured MAC address reduction: disabled

Root switch for vlans: 484,784.

Global loopguard is disabled on the switch.

Global portfast is disabled on the switch.

BPDU skewing detection disabled for the bridge.

BPDU skewed for vlans: none.

Portfast bpdu-guard enabled for bridge.

Portfast bpdu-filter disabled for bridge.

Uplinkfast disabled for bridge.

Backbonefast disabled for bridge.

set spantree priority 10 484

set spantree priority 10 784

Can you explain me by which command they becoming Root Switch on cs102-hy2.

Moreover I dont see any where it is manually defined Root Switch by giving spanning-tree vlan root.

Can u explain me how the root switch is getting selected.

~Akber.

Hi Akber

The output is telling you that your root bridge for vlan 484 & vlan 784 are on different switches.

What switch is at the end of port-channel 101. Could you send the spanning-tree config for that switch.

Jon

Hello Jon,

Thanks for the above information.

Please see belwo the Rott switch status and priority details .

cs102-hy2> (enable) sh spantree summary

Spanning tree mode: RAPID-PVST+

Runtime MAC address reduction: disabled

Configured MAC address reduction: disabled

Root switch for vlans: 484,784.

Global loopguard is disabled on the switch.

Global portfast is disabled on the switch.

BPDU skewing detection disabled for the bridge.

BPDU skewed for vlans: none.

Portfast bpdu-guard enabled for bridge.

Portfast bpdu-filter disabled for bridge.

Uplinkfast disabled for bridge.

Backbonefast disabled for bridge.

set spantree priority 10 484

set spantree priority 10 784

Can you explain me by which command they becoming Root Switch on cs102-hy2.

Moreover I dont see any where it is manually defined Root Switch by giving spanning-tree vlan root.

It is a 6509 cat OS switch ,server access switch .

Can u also tell me why Vlan 1 in my previous config is used for SPT as it is not used for any of the ports and.

Can u explain me how the root switch is getting selected.

Hi Akber

The two lines

set spantree priority 10 484

set spantree priority 10 784

are what makes this the root bridge for those vlans. The default priority on a switch is 32768 so someone has explicitly set this switch up with this priority.

Generally speaking you usually set root bridge one of 2 ways

set spantree priority 8192

set spantree root 484,784

8192 is generally used for spanning-tree root and 16384 for spanning-tree secondary.

The better way to set is the second way. Ankur gave you the equivalent command for IOS. The above commands are CatOS which is what your switch is running.

HTH

Jon

Thanks a ton friend for the input!

From my knowledge, the highest bridge ID priority will be elected as Root switch.

If you define a low bridge ID how will it become root bridge as per your above inputs.

Can you also tell me why we are configuring root bridge as server access switch (In Access layer cs102-hy2) ,rather configuring root as L3 switch (In Dist layer cr3-hy2).

Please need your valuable input .

Many Thanks.

~Akber.

Hi Akber

The bridge with the lowest priority becomes the root bridge for that vlan not the highest.

Without knowing your topology it's difficult to say why your access layer switch is configured as root for this vlan. Generally speaking you don't make access-layer switches as your STP root bridges as this can lead to inefficient L2 paths but it all depends on your vlan distribution and your traffic flows.

Again, generally speaking you have your core/distribution switches as root and secondary but this is only a guideline.

HTH

Jon

Hello John,

So I got to know that, Priority and Bridge priority are different from you words.

I have difficulty in understanding the following scenario.

cs401-hy2 makes itself as Root for 497/797,

though i see priority set as 10 on both cs101/cs401 switches .

can u plz expalin how cs401-hy2 is becoming root for 797.

cs101-hy2> (enable) sh spantree

VLAN 1

Spanning tree mode RAPID-PVST+

Spanning tree type ieee

Spanning tree enabled

Designated Root 00-00-00-00-00-00

Designated Root Priority 0

Designated Root Cost 0

Designated Root Port 1/0

Root Max Age 0 sec Hello Time 0 sec Forward Delay 0 sec

Bridge ID MAC ADDR 00-00-00-00-00-00

Bridge ID Priority 32768

Bridge Max Age 20 sec Hello Time 2 sec Forward Delay 15 sec

Port State Role Cost Prio Type

------------------------ ------------- ---- --------- ---- ---------

cs101-hy2> (enable) sh spantree summary

Spanning tree mode: RAPID-PVST+

Runtime MAC address reduction: disabled

Configured MAC address reduction: disabled

Root switch for vlans: 483.

Global loopguard is disabled on the switch.

Global portfast is disabled on the switch.

BPDU skewing detection disabled for the bridge.

BPDU skewed for vlans: none.

Portfast bpdu-guard enabled for bridge.

Portfast bpdu-filter disabled for bridge.

Uplinkfast disabled for bridge.

Backbonefast disabled for bridge.

Summary of connected spanning tree ports by vlan

VLAN Blocking Listening Learning Forwarding STP Active

----- -------- --------- -------- ---------- ----------

483 0 0 0 78 78

797 0 0 0 1 1

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

cs101-hy2> (enable) sh spantree

VLAN 1

Spanning tree mode RAPID-PVST+

Spanning tree type ieee

Spanning tree enabled

Designated Root 00-00-00-00-00-00

Designated Root Priority 0

Designated Root Cost 0

Designated Root Port 1/0

Root Max Age 0 sec Hello Time 0 sec Forward Delay 0 sec

Bridge ID MAC ADDR 00-00-00-00-00-00

Bridge ID Priority 32768

Bridge Max Age 20 sec Hello Time 2 sec Forward Delay 15 sec

Port State Role Cost Prio Type

#vlan parameters

set spantree priority 10 497

set spantree priority 10 797

------------------------ ------------- ---- --------- ---- -----------

cs101-hy2> (enable) sh spantree summary

Spanning tree mode: RAPID-PVST+

Runtime MAC address reduction: disabled

Configured MAC address reduction: disabled

Root switch for vlans: 483.

Global loopguard is disabled on the switch.

Global portfast is disabled on the switch.

BPDU skewing detection disabled for the bridge.

BPDU skewed for vlans: none.

Portfast bpdu-guard enabled for bridge.

Portfast bpdu-filter disabled for bridge.

Uplinkfast disabled for bridge.

Backbonefast disabled for bridge.

Summary of connected spanning tree ports by vlan

VLAN Blocking Listening Learning Forwarding STP Active

----- -------- --------- -------- ---------- ----------

483 0 0 0 78 78

797 0 0 0 1 1

#vlan parameters

set spantree priority 10 483

set spantree priority 10 797

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

II.

I f you observe above configs , you can see that only 483 vlan is configured in cs101-hy2 switch which is access switch. vlan 483 is not configured for any switches.we configure a seperate vlan for each access switch. On Distribution layer we dont configure L2 vlans .All these layer2 vlans are intergrated with GLBP in Distribution layer switch , where routing works.

Can u plz tell me is it the right way ,if not wht should we could have done.

Awaiting for the reply.

Regards,

Akber.

Hi Akber

If the priority for vlan 797 is set to 10 on both cs101 and cs401 then the lowest mac-address will decide which switch becomes root for that vlan.

If you use separate vlans on each switch how are you connecting the access-list layer switches to your distribution switches. Is it with layer 2 access ports or layer 2 trunks.

Are your layer 3 vlan interfaces created on teh distribution switches. If so i'm not sure what you mean by you don't configure L2 vlans on the distribution switches.

Could you give a bit more detail.

Jon

Hello Jon,

I.

If you look at my above config details in bridge id mac address as 00-00-00-00-00-00 in both switches.

If that is not the right input,can u let know the command on catos to check the mac.

II. We use GLBP on Distribution switches in which you input vlan 483.

please see the below config on cr3-hy2 (Dist switch).

interface GigabitEthernet3/1

description cs101-hy2 ge1/1

ip address 155.145.183.3 255.255.255.0

ip helper-address 155.145.184.17

ip helper-address 155.145.184.14

no ip redirects

ip pim query-interval 3

ip pim sparse-mode

load-interval 30

storm-control broadcast level 0.35

glbp 483 ip 155.145.183.1

glbp 483 timers 1 3

glbp 483 timers redirect 1200 43200

glbp 483 weighting 110 lower 95 upper 105

glbp 483 load-balancing weighted

glbp 483 weighting track 1

glbp 483 weighting track 2

And Ospf routing is configured on dist switch which will communicate to core network.

~Akber.

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