cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2130
Views
10
Helpful
7
Replies

ospf database

rajeshk200_2
Level 1
Level 1

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

7 Replies 7

pkhatri
Level 11
Level 11

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
Level 4
Level 4

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

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

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

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
Level 12
Level 12

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,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

keduncan
Level 1
Level 1

Sho ip ospf database | include X.X.X.X

Review Cisco Networking for a $25 gift card