Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!newshost.telstra.net!act.news.telstra.net!vic.news.telstra.net!news.mira.net.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!news.ysu.edu!usenet.ins.cwru.edu!gatech!newsfeed.internetmci.com!info.ucla.edu!news.bc.net!felix.junction.net!not-for-mail
From: michael@memra.com (Michael Dillon)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Connecting FreeBSD with my ISP
Date: 9 Apr 1996 18:47:22 -0700
Organization: Memra Software Inc. - Internet consulting - http://www.memra.com
Lines: 47
Message-ID: <4kf3va$ch0@sidhe.memra.com>
References: <4jvggt$c92@thoth.portal.ca>
NNTP-Posting-Host: sidhe.memra.com
In article <4jvggt$c92@thoth.portal.ca>,
Christoff Snijders <"hjcs@portal.ca"@portal.ca> wrote:
>Apologies in advance if this is all old hat to everyone on the
>newsgroup, but I am having terrible difficulty connecting to my ISP
>using ppp.
This is the contents of /root/junction.ppp
#!/bin/sh
/usr/sbin/pppd defaultroute mru 552 connect '/usr/bin/chat -f /root/junction.chat' /dev/cuaa1 57600
And the following single line is in /root/junction.chat
"" ATDT555-5555 ogin: secret sword: evenmoresecret
I also run this script from /etc/rc.local to start things up and keep
them going... It's called /root/pppmon and pings the ISP's router 10.1.1.1
every minute to see if the line is up. If it dies (our telco drops lines
every so often) then it kills and restarts pppd and mails me a message.
#!/bin/sh
while true
do
PPPD=`(ping -c 1 -q 10.1.1.1 0>&1) |awk '/%/ {print $7}'`
if [ $PPPD != "0%" ]
then
PPPD=`(ping -c 1 -q 10.1.1.1 0>&1) |awk '/%/ {print $7}'`
if [ $PPPD != "0%" ]
then
PPPD=`ps -ax |awk '/pppd/ {print $1}'`
kill $PPPD
/root/junction.ppp >/dev/null 2>&1 0>&1 &
echo $PPPD. |mail -s "ppp restarted" root@your.freebsd.box
fi
fi
sleep 60
done
I have a static IP address that my ISP's terminal server negotiates with me
(Livingston Portmaster) so that's why it's not in the pppd options. I
expect the same script should work with dynamic addressing. The
/etc/ppp/options file is empty.
--
Michael Dillon Voice: +1-604-546-8022
Memra Software Inc. Fax: +1-604-546-3049
http://www.memra.com E-mail: michael@memra.com