Bug 17409 - Default route lost after ppp connection
Summary: Default route lost after ppp connection
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: ppp
Version: 6.2
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Thomas Woerner
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-09-11 15:46 UTC by John William
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-08-13 09:24:17 UTC
Embargoed:


Attachments (Terms of Use)

Description John William 2000-09-11 15:46:24 UTC
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).

Comment 1 Nalin Dahyabhai 2000-09-11 16:02:48 UTC
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
error.

Comment 2 John William 2000-09-13 06:33:24 UTC
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.


Comment 3 Nalin Dahyabhai 2000-09-13 16:12:24 UTC
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....

Comment 4 John William 2000-09-14 00:26:44 UTC
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.

Comment 5 Nalin Dahyabhai 2000-09-14 02:53:20 UTC
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.

Comment 6 John William 2000-09-14 07:30:01 UTC
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 
routes?

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, 
of course.


Comment 7 Thomas Woerner 2004-08-13 09:24:17 UTC
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.



Note You need to log in before you can comment on or make changes to this bug.