1 2 Previous Next 19 Replies Latest reply: May 14, 2012 4:43 PM by ARam RSS

    Determining Root Bridge in a Switched Network

    vb_bn_vb_bn

       

      Hi,

       

       

      How do you determine the root bridge of a group of vlans in a switched network containing 3-4 switches and you have console access to only one switch? I performed "sh spanning-tree" on the only switch I have console access but this only gives me the mac address of the root bridge. The possible question answers listed the bridges as name and not MAC address. I tried "sh cdp neighbors detail" to get the mac-address of each switch but only got the ip address.This is a question on the CCNA. Any replies will be appreciated.

       

       

      Vince

       

       

        • 1. Re: Determining Root Bridge in a Switched Network
          Conwyn

           

          Hi Vince

           

           

          Show cdp entry *

           

           

          Device ID: Core_1

          Entry address(es):

          IP address: 10.0.0.1

          Platform: cisco WS-C6509-E, Capabilities: Router Switch

           

           

          Telnet to 10.0.0.1

           

           

          show spanning-tree

           

           

          Regards Conwyn

           

           

          • 2. Re: Determining Root Bridge in a Switched Network
            vb_bn

            Conwyn,

             

            Thanks for your reply. I have the mac-address of the root bridge by running "sh spanning-tree" on the only switch I have console access to. How do I determine which bridge has that mac-address since the bridges are listed only by name in the topology? Do I telnet to each bridge and run sh spanning-tree or sh interface after doing sh cdp entry * like you suggested? Is that the most efficient way?

             

             

             

             

             

             

             

             

             

             

             

            Vince

             

             

             

            Vince

            • 3. Re: Determining Root Bridge in a Switched Network
              Conwyn

               

              Hi Vince

               

               

              The show span gives you the mac of the bridge and if you are not the bridge then you have to telnet and you know which port points to the bridge so you will telnet to the next one. when you show vlan again then if the bridge mac = root mac and you have arrived. You can also do show mac table to see which ports points to the mac but I know no otherway than hoping.

               

               

              Regards Conwyn

               

               

              • 4. Re: Determining Root Bridge in a Switched Network
                Gerold Polle

                The names of the direct neighbors you can find out with the command:

                 

                s1>show cdp neighbors

                Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge

                S - Switch, H - Host, I - IGMP, r - Repeater

                 

                Device ID Local Intrfce Holdtme Capability Platform Port ID

                s6 Fas 0/12 154 T S WS-C3548-XFas 0/32

                s4 Fas 0/3 133 T S WS-C3524-XFas 0/24

                s1>

                 

                The names in this example are s1, s4 and s6.

                 

                As I remember in the test it was not possible to use telnet, because no passwords were set.

                So it would be interesting to know, how it is possible to find out the names of the switches,

                that are not direct neighbors.

                • 5. Re: Determining Root Bridge in a Switched Network
                  Chetan

                   

                  Interesting Discussion !!!!

                   

                   

                   

                   

                   

                  If I assume the following :

                   

                   

                  1. Console is available to only one switch

                   

                   

                  2. IP addresses are configured on all the switches

                   

                   

                  3. Switched network is not fully meshed

                   

                   

                  4. Telnet is NOT available to any switch from any switch.

                   

                   

                  5. Answer options lists only SwitchNames and not their mac.

                   

                   

                  6. We can see the SwitchNames and their associated IP in the diagram.

                   

                   

                   

                   

                   

                  Suppose Switch on which console is available is "SW".

                   

                   

                  Use "show spanning-tree" command to find the root bridge MAC.

                   

                   

                  Then ping from SW(on which console is available) to the IP address of all the other switches.

                   

                   

                  Then use "show arp" config mode command to see IP-MAC mapping.

                   

                   

                  I guess, this should solve the problem.

                   

                   

                  • 6. Re: Determining Root Bridge in a Switched Network
                    vb_bn

                    Chetan,

                     

                    Thanks for your reply. This will only work if "sh arp" lists hostnames in its output. I googled "sh arp" and went to the cisco web site and the web site listed "sh arp" as not listing hostnames. Maybe I looked up an old version which is most probable. Does "sh arp" list hostnames? If it does, your solution is inventful.

                     

                     

                    Be Well,

                     

                     

                    Vince

                    • 7. Re: Determining Root Bridge in a Switched Network
                      Conwyn

                       

                      Hi

                       

                       

                      The syntax is show ip arp and it is a router command so your switch would have to be a level 3 switch with ip routing.

                       

                       

                      You could look for the root bridge mac and find the IP of the root bridge

                       

                       

                      Show cdp neigh or show cdp entry * would return the name and port number which you compare with the show vlan but this only applies to directly connected switches.

                       

                       

                      If the root bridge is not phyiscally connected to your switch or you do not have the IP of the root bridge then I know of no way of determining the name.

                       

                       

                      Regards Conwyn

                       

                       

                      • 8. Re: Determining Root Bridge in a Switched Network
                        Gerold Polle

                        The syntax is show ip arp and it is a router command so your switch would have to be a level 3 switch with ip routing

                         

                        I can't agree with your statement. Also a level 2 switch knows sh arp:

                         

                        s1>sh ve

                        Cisco Internetwork Operating System Software

                        IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(12c)EA1, RELEASE SOFTWAR

                        s1>show arp

                        Protocol Address Age (min) Hardware Addr Type Interface

                        Internet 192.168.178.101 - 000c.852d.afc0 ARPA Vlan1

                        s1>show ip arp

                        Protocol Address Age (min) Hardware Addr Type Interface

                        Internet 192.168.178.101 - 000c.852d.afc0 ARPA Vlan1

                        s1>

                        • 9. Re: Determining Root Bridge in a Switched Network
                          Conwyn

                           

                          Hi Gerold

                           

                           

                          I assume that IP is your VLAN Management IP. The thread was discussing if you could ping the other switches management IP numbers and populate the show ip arp and then match the mac address against the root bridge in the show vlan output.

                           

                           

                          Regards Conwyn

                           

                           

                           

                           

                           

                          • 10. Re: Determining Root Bridge in a Switched Network
                            vb_bn

                             

                            conwyn.flavell wrote:

                            Hi

                             

                            The syntax is show ip arp and it is a router command so your switch would have to be a level 3 switch with ip routing.

                             

                             

                             

                            You could look for the root bridge mac and find the IP of the root bridge

                             

                             

                             

                            Show cdp neigh or show cdp entry * would return the name and port number which you compare with the show vlan but this only applies to directly connected switches.

                             

                             

                             

                            If the root bridge is not phyiscally connected to your switch or you do not have the IP of the root bridge then I know of no way of determining the name.

                             

                             

                             

                            Regards Conwyn

                             

                            Hi,

                             

                             

                            I don't undertsand how sh cdp entry * and sh vlan will idneitfy a switch. I understand sh cdp entry * but how can you use the name and port # in conjuction with sh vlan? Sh vlan just returns port# and vlan info. Can you explain this?

                             

                             

                            Vince

                             

                             

                            • 11. Re: Determining Root Bridge in a Switched Network
                              Chetan

                              Hi guys,

                               

                              First, I guess, there are always give some hints in the questions.

                               

                               

                               

                              If I would have the exact diagram and the actual answer choices available then there are many ways to come to a solution.

                               

                               

                               

                              For example we can use the following commands

                               

                               

                               

                              1. show spanning-tree

                               

                               

                               

                              2. show arp

                               

                               

                               

                              3. show cdp neighbour

                               

                               

                               

                              4. show cdp entry *

                               

                               

                               

                              5. and ofcourse PING.

                               

                               

                               

                              From first command, we can have MAC of root bridge and current switch.

                               

                               

                               

                              From cdp commands, we can have IP of directly connected switches and then use ping, show arp to find IP-MAC mapping.

                               

                               

                               

                              If you have 3 switches in the pattern SW1SW2SW3, and console is on SW1, then you can atleast get IP, Hostname and MAC of SW2 (using cdp,ping,show arp etc.). If SW1 is not the root ( as determined from show span), if SW2 is not the root (after doing these trials), then the obvious choice would be SW3. It doesn't matter, in this case, whether we can ping SW3 or not, or if we have any detail of SW3 or not.

                               

                               

                               

                               

                               

                               

                               

                               

                               

                              However, if the configuration is in some other form, another guess, that can be made is by looking the port-cost in the show span command. It does indicate whether our bridge is root or is directly or indirectly connected to root. Like, if there is a root port in the output of show span command, and it is fastethernet and its cost is 19 (which is default), then it clearly means that Switch is directly connected to Root. Some guess work can be done at this stage by looking at the network diagram.

                               

                               

                               

                              So even if ping or telnet is not available some answer can be guessed, but I repeat, it depends upon the actual network diagram.

                               

                               

                               

                              We can find the exact solution only if we have exact and all the information about the question-network.

                              • 12. Re: Determining Root Bridge in a Switched Network
                                Conwyn
                                • 13. Re: Determining Root Bridge in a Switched Network
                                  Clone

                                   

                                   

                                   

                                   

                                  sh spanning tree should also indicate the cost to root.

                                   

                                   

                                  i.e Fast Ethernet link cost 19

                                   

                                   

                                  futher number of switches away the more cost.

                                   

                                   

                                   

                                   

                                   

                                   

                                   

                                   

                                   

                                   

                                   

                                  • 14. Re: Determining Root Bridge in a Switched Network
                                    Damian Halloran

                                    Three step process:

                                    1. sh spanning vlan (vlan-number) : Provides mac address of root

                                     

                                    2. sh mac-address-table vlan (vlan-number) : Provides port mac address of root is attached to

                                     

                                    3. sh cdp neigh detail : Provides details of devices attached to each port

                                     

                                    I was stumped by this one in the exam as well and had to find out.

                                     

                                    Corrections appreciated.

                                    1 2 Previous Next