Getting a defaultroute to stick
mjs111 at rsphy1.anu.edu.au
Fri Jan 25 19:30:17 EST 2002
On Fri, 25 Jan 2002, Howard Lowndes wrote:
HL> I have a site which is dual homed (ADSL and PSTN)
HL> I am trying to script /etc/ppp/ip-down.local so that when the ADSL
HL> connection goes down (the rp-pppoe script for bringing it up has the
HL> defaultroute option) I want the default route to toggle over to the PSTN.
HL> By running debug code in the ip-down.local script I can see the toggling
HL> happening, but at the end of the day the (new) default route has
HL> disappeared again.
HL> Could it be that because this connection that is going down has the
HL> defaultroute associated with it, it takes down any defaultroute that it
HL> finds as its last act of defiance? It ceratinly appears that way
Just set the default route to the PSTN link and use
/sbin/route add -net 0/0 $1 in your ip-up script refering to the ADSL
The route will disappear by itself when the ADSL link goes down...
More information about the linux