*BSD News Article 85283


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.netspace.net.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!nntp.crl.com!data.ramona.vix.com!sonysjc!sonybc!newsjunkie.ans.net!newsfeeds.ans.net!interaccess!no.such.domain!jaykuri
From: jaykuri@no.such.domain (Jay Kuri)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Tips : Dynamic PPP On-Demand Setup
Date: 20 Dec 1996 03:14:13 GMT
Organization: Sirius Cybernetics, Sirius City branch
Lines: 55
Message-ID: <59d0a5$7b7@nntp.interaccess.com>
References: <58jrqe$vks@lantana.singnet.com.sg> <58ujoe$9to@uuneo.neosoft.com>
NNTP-Posting-Host: oneway.com
To: conrads@neosoft.com
Cc: jaykuri@oneway.com, questions@freebsd.org
X-Newsreader: TIN [version 1.2 PL2]
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:32837

: Jay Kuri <jaykuri@oneway.com> sent me the URL for his web page on how to
: setup on demand ppp under FreeBSD.  Followed his very clear instructions
: and it *worked*!

: Interestingly enough, his solution involves using a shell script to invoke
: ppp *and* do some external fiddling with ifconfig/routing info.  Perhaps
: some of the ppp experts in this group would like to check it out and
: verify that his info is accurate.  All I know is that it *works*
: (hallelujah!).  :-)

   Actually, Upon looking at my configuration a second time I realized 
something.  The script that I put in there is completely unnecessary.
Rather than running the script that is on my page, Try this:

In /etc/sysconfig add tun0 to your network_interfaces line.  Add an
ifconfig_tun0 line stating the IP that you used in ppp.conf, and the
gateway you used in ppp.conf.  Then set the defaultrouter option to the 
gateway you set up in ppp.conf.  Set the router option to "NO".
My configuration looks like this:

network_interfaces="lo0 tun0"
ifconfig_tun0="inet 207.70.96.132 207.70.96.10 netmask 0xffffff00"
defaultrouter="207.70.96.10"
router=NO

Then all you have to do is run 'ppp -auto default' to start the daemon 
running  -OR-
  If you are feeling really adventurous you could add a new field to 
the sysconfig file:  

	pppautostart=YES

and at the end of /etc/netstart:

if [ "x$pppautostart" = "xYES" ]; then
	echo -n starting ppp daemon: 
	/usr/sbin/ppp -auto default
	echo .
fi

Then you will really have auto-dial ppp working.  You'll never have
to touch the thing again.

: See http://pinky.interaccess.com/jay/freebsd/ppp.html (thanks again,
: Jay!).

   You're very welcome.  I'll be updating my page to reflect the above
either tonight or this weekend.  Happy PPP-ing.

Happy winter-season-ish-time,
Jay K.

---
Everyone can be taught to sculpt:  Michelangelo would have had to be 
taught how not to.  So it is with the great programmers.