01-06-2013 04:20 AM - edited 03-04-2019 06:35 PM
I am new to OSPF and trying to find a command which can tell "how many routers belong to an area". Is there such a command available?
Solved! Go to Solution.
01-06-2013 04:48 AM
Hello,
I do not think such command is readily available; however, what you can do is to enter the show ip ospf database command and count the entries in the section labeled "Router Link States". Each entry in this section corresponds to one particular router in the corresponding area. Therefore, the number of these router link states (also called Link State Advertisements Type 1, or LSA-1) immediately tells you how many routers are there in the particular area.
Best regards,
Peter
01-06-2013 03:52 PM
What about "sh ip ospf database database-summary"?
Or with more information and counting: "sh ip ospf database router | i Advertising"
01-06-2013 04:48 AM
Hello,
I do not think such command is readily available; however, what you can do is to enter the show ip ospf database command and count the entries in the section labeled "Router Link States". Each entry in this section corresponds to one particular router in the corresponding area. Therefore, the number of these router link states (also called Link State Advertisements Type 1, or LSA-1) immediately tells you how many routers are there in the particular area.
Best regards,
Peter
01-06-2013 05:00 AM
Thanks for the reply, Peter. That is certainly what I am looking for! Thanks so much.
01-06-2013 05:03 AM
Disclaimer
The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
Liability Disclaimer
In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
Posting
The command Peter referenced might have additional options that may limit the output so there's less to look at; i.e. you really don't want to see all the ospf database, just the section of information Peter described. If not, I recall (?) that's listed first. (Sorry, at the moment don't have access to any Cisco router to check.)
01-06-2013 05:10 AM
Yes that is listed first in the output.
Thanks.
01-06-2013 05:23 AM
Hello Kashish and Joseph,
I was actually looking for a command that displays the count of LSA-1 in the link-state database. That would be completely enough to tell how many routers are there in an area. Sadly, I wasn't able to find it in Cisco IOS CLI (anyone knowing better please share your knowledge!). Also, there is the show ip ospf database router command but that one is going to display the contents of LSA-1 which makes the output even more lengthy. I did not find any other ways of simply and effectively limiting the output so I eventually just stayed with the basic show ip ospf database command.
Best regards,
Peter
01-06-2013 03:52 PM
What about "sh ip ospf database database-summary"?
Or with more information and counting: "sh ip ospf database router | i Advertising"
01-06-2013 03:56 PM
Karsten,
LOL, I must have been blind or something That's it - the show ip ospf database database-summary Thank you so much! Rated as deserved.
Best regards,
Peter
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide