ip route to dhcp gateway gets overruled by ospf default route

Unanswered Question
Jul 24th, 2009

Hi,


I'm running into the following problem:


Head end router: 3825, all static IP's. OSPF Area 0 and Area 105.


Branch office router 871: inside IP's static, outside ip via dhcp (cable modem)


In order to get the 871 working in the first place I need a default route to the gateway assigned via dhcp.

(ip route 0.0.0.0 0.0.0.0 dhcp).


Routing entry for 0.0.0.0/0, supernet

Known via "static", distance 254, metric 0, candidate default path

Redistributing via ospf 65000

Routing Descriptor Blocks:

* 77.251.99.1

Route metric is 0, traffic share count is 1


The problem with this is that the default static route is assigned a AD of 254 instead of 1. The consequence is that when my VPN tunnels come up the OSPF process overrules my default route to my ISP which results in recursive routing.


The solution to this problem is to change the administrative distance to something else less than 110, which can be done by entering:

ip route 0.0.0.0 0.0.0.0 dhcp 2


After I do this the following information enters my routing table:


Routing entry for 0.0.0.0/0, supernet

Known via "static", distance 2, metric 0, candidate default path

Redistributing via ospf 65000

Routing Descriptor Blocks:

* 77.251.99.1

Route metric is 0, traffic share count is 1


After this m VPN tunnels come up fine and my OSPF process loads completely.


But for some reason after a while the 871 "forgets" the AD of 2 and the default route reenters my routing table with an AD of 254 which results in crashing VPN connection because of the recursive routing. I checked and double checked that my running config shows "ip route 0.0.0.0 0.0.0.0 dhcp 2".


Any idea why the route suddenly re-enters my table with a wrong AD?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
2044418Puts Fri, 07/24/2009 - 03:37

I've changed the static route to:


ip route 0.0.0.0 0.0.0.0 faste4.


Faste4 is my WAN interface.


This did the trick.

Actions

This Discussion