Article View: comp.os.linux.networking
Article #344ip-up script not working
From: Carl Renneberg
Date: Mon, 22 Apr 1996 00:00
Date: Mon, 22 Apr 1996 00:00
39 lines
2177 bytes
2177 bytes
My home system runs ppp-2.2.0.c with a 1.2.13 kernel. ppp gets loaded as a
module at boot time, and the kernel has IP forwarding compiled.
I want to:
- dial up my home system from host 203.25.235.1 (at work), and login to an
account that starts up a ppp link;
- on my home system, add a network route (not default route) for
203.25.235.0 over the ppp interface.
The first part I can do, no problem. To handle the second part, I put the
following in /etc/ppp/ip-up, on my home system:
case $5 in \
203.25.235.?|203.25.235.??|203.25.235.???) \
route add -net 203.25.235.0 gw 203.25.235.1 netmask 255.255.255.0;; \
esac
exit 0
According to the pppd man page, ip-up gets called with several parameters,
with the fifth one equal to the destination address. Also, according to the
man page, ip-up gets executed only after the link gets established.
My problem is that the ip-up script above doesn't work. pppd executes the
script (with source address 192.168.0.1; destination address 203.25.235.1), the
ppp link gets established, but netstat -rn doesn't show a network route,
only a host route.
But if I execute ip-up "by hand" as root, once the link is established,
netstat *does* show the network route (as well as the host route), and pings
to any hosts on 203.25.235.0 get sent via the ppp interface, as expected.
Can someone shed some light on this, and say what I need to do to get ip-up
to work when pppd executes it?
Thanks,
Carl.
Technical Details
Message-ID:
<4lg05j$vn8@gidora.kralizec.net.au>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10669a,9b64798996fc2445,start X-Google-Attributes: gid10669a,public X-Google-Thread: 102983,9b64798996fc2445,start X-Google-Attributes: gid102983,public From: Carl Renneberg <renneber@tmx.mhs.oz.au> Subject: ip-up script not working Date: 1996/04/22 Message-ID: <4lg05j$vn8@gidora.kralizec.net.au> X-Deja-AN: 150788794 content-type: text/plain; charset=us-ascii organization: sci-log x-url: news:comp.os.linux.networking/35139-35438#4l3jk6$fs1@netline-fddi.jpl.nasa.gov mime-version: 1.0 newsgroups: comp.os.linux.networking,aus.computers.linux x-mailer: Mozilla 1.1N (X11; I; Linux 1.2.13 i486)