I am playing around with Dynamips to learn about OSPF. What I would like to do is show the OSPF routes advertised to a router from its neighbour which aren't in the routing table because a better path already exists (i.e. same subnet, different AD or metric).
I would like to be able to see the distance / metric for those routes.
I have tried to find my way through show ip ospf database * commands but I can't find the info anywhere. I know the route is there, because when I shut down the interface or change the bandwidth/cost the network converges and the previously unfavoured route is used.
Any help is most appreciated - thanks!
Re: How to show OSPF routes not in the Route Table
10 years 6 months ago #27651
OSPF is a link-state routing protocol. Routers don't actually advertize their routes to neighboring routers. Instead, they advertise the states of the links connected to them. At the end each router in the network gets a full topology map of the whole network (in a single area). The SPF algorithm is then used to compute the reachability of destinations. This information is used to update the routing table. This process can discover changes in the network topology caused by component failure or network growth.
To show more info about the link-states database try "show ospf database" instead of "show ip ospf database". Unfortunately, I personally find the details about this command a bit unclear.
Yeah I was starting to suspect something similar when I couldn't find a straight forward solution (unlike EIGRP / BGP). If I setup a null route I see that route turn up under the 'Network LSAs' in show ip ospf database but there is no useful information. I think I need to read up a bit more. Cheers.