Red Hat Bugzilla – Bug 17409
Default route lost after ppp connection
Last modified: 2008-05-01 11:37:58 EDT
I'm not sure if this is best reported under ppp, pump or linuxconf.
Standard RH6.2 distribution with pump-0.7.8-1, ppp-2.3.11-4 and linuxconf-
1.21r1-1. The machine has one ppp link (ppp0) and two ethernet cards. One
card (eth0) is connected to the Internet and the other (eth1) is connected
to the internal network.
Normally, eth0 is up and the default route points to it. Bringing up a ppp
connection (even if unsuccessful) causes the default route to be lost.
Linuxconf does not recognize this fact and the ethernet interface must be
brought down (/sbin/ifconfig eth0 down) and pump killed off (killall pump)
before the default route can be restored.
This makes it difficult to use a ppp link as a backup link in the event
the eth0 link fails.
I suspect the problem is with pppd inappropriately killing off the default
route when it should leave it alone (since one is already set).
Have you set your PPP connection up so that it becomes the default route when it
is brought up? If so, changing "DEFROUTE" in
/etc/sysconfig/network-scripts/ifcfg-ppp0 to "no" should change this behavior to
what you expect. Most dialup users use PPP as their default route, and we
default to setting it up this way in case the user has set a default route in
You're right - that was the problem. A really nice enhancement would be to have
an automated way to save and restore the default route after bringing up a ppp
link. That would be very useful, for example, when using ppp as a back-up to a
high-speed Internet connection.
The way I have to do it now is have "ifconfig eth0 down ; killall pump ;
ifconfig eth1 up ; pump -i /dev/eth0" (with appropriate delays and error
checking, of course) in the ppp-down script.
This might be a better solution than simply overwriting the (old) default route.
Unfortunately you can only have one default route active at a time. The
configuration scripts in the development tree actually attempt to restore a
pre-existing default route when PPP goes down, but they can only do that if the
configuration files (i.e., /etc/sysconfig/network) have one listed, which is not
the case if you're using DHCP. But then, attempting to renew all DHCP leases
might also cause problems....
Correct, you might not have a default route listed in /etc/sysconfig/network,
or the default route could be bogus because some other boot script has changed
the default. Or a DHCP link. Or even a sysadmin manually doing it at the
command line and forgetting to put it in a script.
Why not determine the current route immediately before replacing it when the
ppp link is established? A simplistic way would be to parse the output
of "/sbin/route -n". That way you're not bound to relying upon the information
being in any specific location; you're simply seeing what's already there and
then putting it back the way you found it.
Mostly because there's no "correct" place to store this information, and the
script that brings the PPP interface down doesn't share its environment with the
script that brought it up, so it has to be stored somewhere if we want to use it
later. If pump wrote the information for your lease to a configuration file, it
would be very easy to do, though. Perhaps I should reclassify this as an
enhancement request for pump, as saving the information to a well-known file
name in pump would solve this problem quite elegantly.
I agree, making pump save the information out would simplify the case when
using pump. But what about other cases, like manually set (or scripted) default
I know there is no "default" place for ip-up/ip-down to store this information,
but what about /etc/ppp? Maybe something like /etc/ppp/route.saved containing
the default route set before the interface came up. Read/writable only by root,
Please verify this with a newer version of Red Hat Enterprise Linux or Fedora
Core and reopen it against the new version if it still occurs.
Closing as "not a bug" for now.