12-12-2006 10:25 PM - edited 03-05-2019 01:19 PM
Hi all,
How to find entries for network (deatination-not a link id ) on ospf database.
for example
if i want to find routes(multiple paths if any ) for network X.X.X.X on the ospf database.
Thanks in advance.
rgds,
Rajesh
12-12-2006 10:39 PM
Rajesh,
The best way to do this is to use the 'sh ip ospf database' command, suffixed with one of the following: "router, network, summary, asbr-summary, or external". For example:
sh ip ospf database router
sh ip ospf database network
sh ip ospf database summary
sh ip ospf database asbr-summary
sh ip ospf database external
Paresh
PS> Pls do remember to rate posts.
12-13-2006 12:13 AM
hi rajeshk200
trying to figure out what networks or destinations from the database it can be more chalenging ,the best place to look for that is the routing table.
However to do so you have to understand each lsa type very well ,for example : from what the link-id is derivated !!, what kind of router advertise a given kind of LSA!! but yes indeed for some kind of LSAs you can find out the information you are looking for, i mean the destination networks for instance lsa type 1 called router advertissement that lsa could not give you any information about the destination since the link-id in that case is just a RID of the router advertising that LSA, but LSA type 3 which is a summary ,here the link-id indeed shows you the destination network that are reachable within the area and only that area the advertising ABR router reside in.
you can do so using the commands posted by Paresh , show ip ospf database summary X.X.X.X
and dont get surprised if you find a destination in the database but you dont find it in the routing table this true especialy when it comes to advertise a default route by the ABR to a stub area, this route you find it using show ip ospf database summary 0.0.0.0
but when you perform show ip route 0.0.0.0 on that ABR you will not find it.but sure you do find it on the routers within the stub area to which that ABR advertise it.
HTH
please do rate if it does clarify
07-17-2012 03:21 AM
Dear all,
Apologies for reopening an old post, but still it does not seem to be answered.
As previous replies have rightly pointed out that Link ID does not in any way refer to the route being advertised. Each link ID contains the "destinations" being advertised.
My question is, is there a way to avoid going through the LSAs one by one and get to know all the received routes for a particular destination. The routing table is not a great place to look for since it is populated by best paths and does not include "candidate" routes.
Regards,
Kyle
07-17-2012 04:25 AM
Hello Kyle,
I do not believe any such command is available on Cisco devices. The reason, as I see it, is that you basically want to see a set of all possible paths between vertices u and v. The Dijkstra algorithm behind OSPF never constructs such a set so there is no immediate stored information which could be displayed to you.
Best regards,
Peter
07-17-2012 04:35 AM
Hello Peter,
Your statement makes absolutely a lot of sense. The Dijkstra algorithm calculates the best route on the fly, example on the event that the best route becomes unavailable. It does not store successor routes as EIGRP does.
Rated your reply.
Thanks a lot,
Kyle
12-13-2006 04:37 AM
if it is an intra area route, the easiest way is to take the router-id reported by the "from" field in the output of a "show ip route
Hope this helps,
01-04-2007 12:48 PM
Sho ip ospf database | include X.X.X.X
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