cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1848
Views
10
Helpful
4
Replies

Prefix in OSPF database but not routing table

j1mbo78
Level 1
Level 1

Hi,

Can anybody shed any light on a weird OSPF problem I have been experiencing. I have simplified it somewhat to make it easier to explain. I have also drawn a very simple diagram in notepad and attached it to this post.

We have a subnet which I will call 10.1.1.0/24. This subnet can be reached from two different routers, Router 1 and Router 2 who both learn about it via OSPF from the same upstream device, Router 3. Router 3 is redistributing the 10.1.1.0/24 route from static to OSPF. The next hop for this route (10.1.1.0/24 ) is 10.2.2.1 which is a router (R4) connected to a segment on R3 (10.2.2.0/24).

R1 also learns about the intermediate subnet (10.2.2.0/24) via OSPF from R3 , R2 has a static route for the this subnet via R3.

The strange thing is that although R1 and R2 have the 10.1.1.0 prefix in their database, only R1 puts it in the routing table. The only way I can get R2 to put the prefix in its routing table is by removing the static route for the intermediate hop (10.2.2.0/24) so it learns it via OSPF, then it will put it in. Can anybody explain this?

It is as though you can't have a static route for a network that contains the forwarding address of a route you are learning.

I hope you can make some sense of this, it's a bit tough to explain :)

Cheers,

James Smith

4 Replies 4

rais
Level 7
Level 7

Shouldn't R2's next hop for 10.1.1.0/24 network be R3's address direcctly connected to R2? Is it a single OSPF area?

Regards.

Harold Ritter
Spotlight
Spotlight

The problem is that the "forward address" has to be learn via OSPF for the external route to be considered valid by OSPF. To find-out what the "forward address" is just do a "show ip ospf da ext "

R1 installs the route in its RIB because the "forwarding address" is learnt via OSPF, whereas R2 learns about the "forward address" via a static route and therefore doesn't install it in its RIB.

Remove the static route on R2 and make sure the "forward address" is learnt via ospf and the external route will be installed in the RIB.

In you case the "forwarding address" is 10.2.2.1.

Hope this helps,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

Thanks for that. I fixed this problem by doing exactly what you said, removing the static for the forwarding address subnet so it was learnt via OSPF which in turn resulted in the the missing prefix being put in to the routing table.

Would you be able to explain why a forwarding address for an external route needs to be learnt via OSPF and cannot be reached by static routes?

Many Thanks.

James

James,

This behavior is dictated by RFC2328 16.4 (3), which says:

If the forwarding address is non-zero, look up the forwarding address in the routing table.[24] The matching routing table entry must specify an intra-area or inter-area path; if no such path exists, do nothing with the LSA and consider the next in the list.

Hope this helps,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)