Thomas Hood wrote:
On Fri, 2003-07-18 at 11:47, Leandro Guimarães Faria Corsetti Dutra wrote:It _should_ be automatic. I use ppp once a week, and ethernet the rest of the time. When I bring up ppp it always overrides the default route. The ppp config parameter is something obscure like "defaultroute" :-)Looks like it refuses to overwrite the existing default route...pppd won't replace an existing default route, even if it is given the "defaultroute" option.
my bad. of course not. I did know that once. Now that I think of it, I only have the default route on eth0 if eth0 picked it up from dhcp - which it can't do when I'm home - so of course it always works in my situation.
So... you can put "route del default" into /etc/ppp/ip-up (or if your ip-up does runparts on ip-up.d, then put a script in ip-up.d to do the same), or if that's too late (it might be), try doing the same with /etc/ppp/auth-up. Of course, this might leave you without a defaultroute when pppd terminates, so you might need your script to find the existing default route and restore it in /etc/ppp/ip-down.