cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1432
Views
0
Helpful
7
Replies

How many routers in an ospf area

Kashish_Patel
Level 2
Level 2

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?

2 Accepted Solutions

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

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

View solution in original post

What about "sh ip ospf database database-summary"?

Or with more information and counting: "sh ip ospf database router | i Advertising"

View solution in original post

7 Replies 7

Peter Paluch
Cisco Employee
Cisco Employee

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

Thanks for the reply, Peter. That is certainly what I am looking for! Thanks so much.

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.)

Yes that is listed first in the output.

Thanks.

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

What about "sh ip ospf database database-summary"?

Or with more information and counting: "sh ip ospf database router | i Advertising"

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