ospf database

Unanswered Question
Dec 12th, 2006
User Badges:

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
pkhatri Tue, 12/12/2006 - 22:39
User Badges:
  • Purple, 4500 points or more

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.

kamal-learn Wed, 12/13/2006 - 00:13
User Badges:
  • Bronze, 100 points or more

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

Kyle Camilleri Tue, 07/17/2012 - 03:21
User Badges:

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

Peter Paluch Tue, 07/17/2012 - 04:25
User Badges:
  • Cisco Employee,

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

Kyle Camilleri Tue, 07/17/2012 - 04:35
User Badges:

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

Harold Ritter Wed, 12/13/2006 - 04:37
User Badges:
  • Cisco Employee,

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 " and then do a "show ip ospf data router ".


Hope this helps,

Actions

This Discussion