Thread View: comp.os.linux.networking
4 messages
4 total messages
Started by Carl Renneberg
Mon, 22 Apr 1996 00:00
ip-up script not working
Author: 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.
Re: ip-up script not working
Author: Pat Fruth
Date: Mon, 22 Apr 1996 00:00
Date: Mon, 22 Apr 1996 00:00
5 lines
790 bytes
790 bytes
You need to speify the full path to the route command. (ie. /sbin/route add -net ...... ) Regards, Pat Pat_Fruth@DLX.com
Re: ip-up script not working
Author: ic
Date: Fri, 03 May 1996 00:00
Date: Fri, 03 May 1996 00:00
33 lines
1735 bytes
1735 bytes
In article <4lg05j$vn8@gidora.kralizec.net.au> Carl Renneberg <renneber@tmx.mhs.oz.au> writes:
>From: Carl Renneberg <renneber@tmx.mhs.oz.au>
>Subject: ip-up script not working
>Date: 22 Apr 1996 13:04:51 GMT
>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
I set my routes up with the default route always pointing at ppp0 and
the local network addresses pointing at eth0.
I figure anything outside my home network will fail when ppp0 is down anyway.
One other thing do you have #!/bin/sh at the start of the ip-up script?
IanC
ip-up script not working
Author: Tony Langdon
Date: Sun, 05 May 1996 00:00
Date: Sun, 05 May 1996 00:00
30 lines
1685 bytes
1685 bytes
It's 04 May 96 02:15, We'll return to ic@deakin.edu.au and All's discussion of ip-up script not working ic> I set my routes up with the default route always pointing at ppp0 and ic> the local network addresses pointing at eth0. I just let pppd define the default route dynamically, by using the 'defaultroute' option. When the link's down, attempting to access any address outside the Ethernet results in "network unreachable", and the process aborts quickly and cleanly. :-) No need to run route either. pppd will look after it all. :-) ic> I figure anything outside my home network will fail when ppp0 is down ic> anyway. It will, but having the default route entry removed when the link goes down is a bit cleaner. :-) ... So I'm offtopic, what ya gonna do abou@#$^ NO CARRIER -- | Fidonet: Tony Langdon 3:632/367.2 | Internet: tlang@freeway.DIALix.oz.au | | Freeway Internet Gateway, Melbourne, Australia. For information about | our services and conditions of use, e-mail: | info@freeway.DIALix.oz.au, to receive a copy of the FAQ.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads