Getting a defaultroute to stick - Problem solved

Howard Lowndes lannet at
Fri Jan 25 21:05:35 EST 2002

It seems that it was some sort of race condition.

I was running adsl-stop;route -n to drop the line and then to look at the
routing tables immediately afterwards.

Well the debug code in the ip-down.local showed the changes to the routing
table (I wss logging them to syslog), but looking at the routing tables
immediatly after the adsl-stop did not show the changes.

I then tried adsl-stop;sleep 5;route -n and the routing table showed up

I guess the adsl-stop detaches the shutdown process from the terminal and
executes it in the background and that I was seeing the routing tables
BEFORE they had been updated.

It had me confused for a few hours.

On Fri, 25 Jan 2002, Howard Lowndes wrote:

> I have a site which is dual homed (ADSL and PSTN)
> I am trying to script /etc/ppp/ip-down.local so that when the ADSL
> connection goes down (the rp-pppoe script for bringing it up has the
> defaultroute option) I want the default route to toggle over to the PSTN.
> By running debug code in the ip-down.local script I can see the toggling
> happening, but at the end of the day the (new) default route has
> disappeared again.
> Could it be that because this connection that is going down has the
> defaultroute associated with it, it takes down any defaultroute that it
> finds as its last act of defiance?  It ceratinly appears that way

LANNet Computing Associates - Your Linux people
Contact detail at
 "We are either doing something, or we are not.
 'Talking about' is a subset of 'not'."

More information about the linux mailing list