Subject: Re: pppd ip-up help.
To: Glen Johnson <nelg@rev.net>
From: Julian Coleman <jdc@coris.org.uk>
List: netbsd-help
Date: 01/20/2004 10:04:04
> I can ping, do what ever I like. I
> read that there is a script called ip-up which is "supposed" to
> automatically execute once a connection is made. I seem unable to make
> this happen. I saw in one e-mail that you have to use full path names for
> the executables inside the ip-up script, did that. No such luck. I made
> sure the attribute is set to -rwxr-xr-x and that didn't seem to help
> either.
The /etc/ppp/ip-up script is executed when the pppd link is available for
sending/receiving IP. Similarly, the /etc/ppp/ip-down script is executed
when the link is no longer available for sending/receiving. The scripts are
passed the parameters: `interface-name', `tty-device', `speed',
`local-IP-address', `remote-IP-address' and `ipparam'. The scripts must be
executable (maybe by the user running PPP - I can't remember - my scripts
were mode 0755).
As a test, you could try the appended script as /etc/ppp/ip-up. You should
see messages output to the console when the link comes up.
J
- - 8< - - - - - - - - - - - - - Cut here - - - - - - - - - - - - - >8 - -
#!/bin/sh
#
# /etc/ppp/ip-up
#
# Executed when a pppd link is available for sending and receiving IP packets.
#
# Parameters are
# interface-name
# tty-device
# speed
# local-IP-address
# remote-IP-address
# ipparam
echo "PPP link $1 up on $2 at $3" >> /dev/console
echo "Local IP: $4" >> /dev/console
echo "Remote IP: $5" >> /dev/console
#echo "Local hostname: "`/usr/bin/nslookup $4 | \
/usr/bin/awk '{if ($1 == "Name:")printf $2}' >> /dev/console
echo "Additional parameters: $6" >> /dev/console
- - 8< - - - - - - - - - - - - - Cut here - - - - - - - - - - - - - >8 - -
--
My other computer also runs NetBSD / Sailing at Newbiggin
http://www.netbsd.org/ / http://www.newbigginsailingclub.org/