[geeks] HELP: interesting ppp0 configuration problem

Charles Shannon Hendrix shannon at widomaker.com
Thu Feb 22 20:25:33 CST 2007


For a few weeks now, I've been running with two Internet gateways on my
gateway machine.

It works great, except for the ppp part.

Brief description:

ppp0 goes to my ISP, and I want all DNS, SMTP, and NNTP traffic to go
out that way, plus traffic to a few machines that are only reachable
from my ISP.

hme1 goes to a wireless LAN gateway, and everything else including
default route goes that way for the speed.

It works great, except I cannot figure out how to automate the
configuration of the ppp0 link.

Normally, it is easy: you give the defaultroute option in your
configuration, and set up any additional routes needed in
/etc/ppp/ip-up.

However, I do not want ppp to be the default route, so I use the
nodefaultroute option.

That is where the trouble starts.

pppd only does demand dialing if a packet needs to be routed through it.
No packets get routed because there are no routes which specify
the ppp0 ip address.  I can't create those routes until *AFTER* the
interface comes up.

Since I want this to be automatic, it seems like a circular dependency.

I can manually bring up the interface by pinging its local IP address,
and then manually create the first needed routes, but obviously that
does me no good when I'm not around.

How can I make pppd do demand dialing without a default route?  Some how
I need for DNS, SMTP, and NNTP traffic to trigger pppd to bring up the
link, but I can't figure out how since I can't create routes until the
link comes up.

I've been thinking of using ipfilter to trigger a script which brings
ppp0 up, but that seems ugly.

Surely there must be a way make pppd do demand links without a default
route.

One final issue, probably a pppd bug:

If I use the "nodefaultroute" option in /etc/ppp/options, it works a
little bit too well.  Not only does pppd not create a default route, but
it deletes any existing default route.

I can script around that problem, but I'd appreciate it if anyone knows
a better way around it. I read the fine manual, but I don't see it
mentioned anywhere that pppd would delete existing default routes.
Sounds pretty dumb to me.

-- 
shannon /         Trouble rather the tiger in his lair than the sage amongst 
-------'          his books For to you kingdoms and their armies are
                  mighty and enduring,  but to him they are but toys of
                  the moment to be overturned by the flicking of a finger. 



More information about the geeks mailing list