*BSD News Article 85416


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!spool.mu.edu!usenet.eel.ufl.edu!www.nntp.primenet.com!nntp.primenet.com!howland.erols.net!worldnet.att.net!uunet!in3.uu.net!208.192.224.3!news.interactive.net!news
From: Jay Sachs <sachs@interactive.net>
Subject: Re: Tips : Dynamic PPP On-Demand Setup
Content-Type: text/plain; charset=US-ASCII
X-Newsreader: Gnus v5.2.40/XEmacs 19.14
X-Nntp-Posting-User: (Unauthenticated)
Sender: sachs@luddite.org
Organization: IBS Interactive, Inc.
Lines: 28
Message-ID: <87681x16ox.fsf@luddite.org>
References: <58jrqe$vks@lantana.singnet.com.sg> <58ujoe$9to@uuneo.neosoft.com>
	<59d0a5$7b7@nntp.interaccess.com> <32BA3897.500F9F30@FreeBSD.org>
	<59ee4c$jch@nntp.interaccess.com>
Mime-Version: 1.0 (generated by tm-edit 7.89)
X-Trace: 851101918/24930
X-Face: +i14.(3OL6caXxAJslm\+OS:-ckkfx6J6UzO>df-4b#2+d{+TH;5DC9Nc1Z7'1>s^AZ"HG7
 Av0@MtZ81SyDECC9S"PEo%s"dY4&Hud:w!PjnmT,FL2Sv(5oI7Y"l;|1rf:^'n$Ghg~?x3hanxCg"N
 ))JT[Ja%$#"Ou)FSb(2#e3*\xq{R;b]Ur8<bFS-|%V*B]eO]<iSa^>$!%w~t4|q@<_xKd??D~Zf(r!
 p#GC$,Cdm:$OdYL&B!;V%Ei^{N)96)[{pWI{@{ZsEn%oMxJ><(7-!YJ\`fx
X-Nntp-Posting-Host: host001.madison.interactive.net
Date: Fri, 20 Dec 1996 17:11:58 GMT
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:32921

> : The configuration of tun0 will be done automatically by ppp when you
> : start it; no preconfiguration of tun0 is necessary.
> 
>    I noticed this.  However, It does not give the interface an address,
> as such, the packet that should cause ppp to dial never makes it to the
> tun0 interface.  In order for anything to reach the tun0 interface, it 
> needs an address assigned to it.  
>    PPP won't configure the tun0 interface with an IP until it negotiates 
> an IP with the PPP server.  In auto mode, it won't dial up until a packet 
> is sent via the tun0 interface.  If the tun0 interface has no IP, no packet
> will ever make it to the tun0 interface, hence ppp will never dial.
>    Hence, it seems, in auto-mode at least, that you must ifconfig the tun0
> interface with an IP, even if that IP will change once PPP has connected.
>    If I am wrong, and there's something I'm missing, please fill me in.

For on-demand dialing, you need to put something like

  set ifaddr  xxx.xxx.xxx.xxx/0 yyy.yyy.yyy.yyy/0
  add 0 255.255.255.0 yyy.yyy.yyy.yyy

in ppp.conf. The ifaddr ifconfigs tun0; the add adds the route so that
a packet out tun0 triggers ppp. You should make xxx... and yyy... look
as much like the ultimate IP addresses as they can, based on past
connections. Actually, this isn't strictly necessary; they just need
to be valid-looking IP addresses (not 127.0.0.1, or 0.0.0.0 for
example); xxx = 192.168.0.1 and yyy = 192.168.0.2 should work.

-jay