*BSD News Article 84869


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.Hawaii.Edu!news.uoregon.edu!news.texoma.com!uunet!in2.uu.net!204.180.128.35!news.mindspring.com!mindspring!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!su-news-hub1.bbnplanet.com!www.nntp.primenet.com!nntp.primenet.com!dispatch.news.demon.net!demon!awfulhak.demon.co.uk!awfulhak.demon.co.uk!awfulhak.demon.co.uk!not-for-mail
From: brian@awfulhak.demon.co.uk (Brian Somers)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Tips : Dynamic PPP On-Demand Setup
Date: 12 Dec 1996 16:32:00 -0000
Organization: Coverform Ltd.
Lines: 81
Message-ID: <58pc20$dic@anorak.coverform.lan>
References: <58jrqe$vks@lantana.singnet.com.sg>
NNTP-Posting-Host: anorak.coverform.lan
X-NNTP-Posting-Host: awfulhak.demon.co.uk
X-Newsreader: TIN [version 1.2 PL2]
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:32464

Jason Tseng (light@singnet.com.sg) wrote:

[.....]
: 	 delete ALL
: 	 add 0 0 HISADDR


: * IMPORTANT (For "ondemand"):
: - You need to set dummy addresses so that you can start the ppp in
: auto mode. Importantly, for the "set ifaddr" line, make sure
: it is in this format "set ifaddr x.x.x.x/0 y.y.y.y/0" where x.x.x.x is
: your localhost address (eg 127.0.0....), also found in the hosts file.
: The y.y.y.y is the destination address, you can use any dummy
: addresses here. Just be consistent throughout (later on...).
: - Make sure "delete all" and "add 0 0 HISADDR" are added as well

And that ALL is in capitals !  This wasted a lot of my time at one point.

: - The reason why I wanted a new label for the ppp on-demand is just so
: that I can adjust the timeout setting when on-demand.
: - Setting the timeout to 60 is a safe bet (See note later on)


: * Starting ppp on-demand

: 1) Initialize the tun0 device to some dummy addresses by typing:
: "ifconfig tun0 inet x.x.x.x y.y.y.y" at the shell prompt, where
: x.x.x.x is your localhost address and y.y.y.y is some other dummy
: address. eg.

: $ ifconfig tun0 inet 192.168.0.0 192.168.0.1
[.....]
Are you sure this is necessary ?  It's not w/ my setup, the ifaddr in
ppp.conf is supposed to do this

[.....]

: * IMPORTANT:
: - Patience... be prepared to wait between 20-30secs after trying to
: access an address (eg ping etc), before any modem activity starts up.

Hmm, it's immediate for me - maybe you've got a slow DNS ?  Does the
first line of the ping come out before or after the pause ?  Have you
tried it with an IP number rather than a name ?

: - About the timeout value in ppp.conf. I noticed that the system will
: logon to the ISP even when I do nothing to access any net
: addresses.

I'd be *very* surprised if this were true.  Try running tcpdump on your
tun0 device.  Most of the complaints I've seen about unwarranted dialing
have ended up being routed's fault (which of you *probably* don't need to
run).

:            While it is connected, I have yet to test the timeout value
: to see if it will disconnect after the certain period of time, or stay
: online indefinitely.

The alarms are set at dial time, so changing the timeout while a connection
is established will not affect the current session - I suspect this should
change so that the alarms are immediately reset (starting when the timeout
command is issued).

: You can also try putting the ppp on-demand startup in a script file or
: put the ifconfig settings for tun0 in the sysconfig instead. But I
: havent tried the latter.

My rc.local does the "ppp -auto ..." without problems.


One other thing - about the openmode.  This isn't always necessary - it
depends on the other side.  For example, if you're talking to another version
of iijppp, you don't need it.  "set openmode active" tells the local end to
initiate negotiation - this is only the default if you've used the -direct
or -dedicated switches.  Unfortunately, I can't find out if this behaviour
is correct - the rfc is suitably vague in this area.

--
Brian <brian@awfulhak.demon.co.uk>, <brian@freebsd.org>
      <http://www.awfulhak.demon.co.uk/>
Don't _EVER_ lose your sense of humour....