From owner-freebsd-questions Wed Dec 4 18:08:42 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.8.3/8.7.3) id SAA00711 for questions-outgoing; Wed, 4 Dec 1996 18:08:42 -0800 (PST) Received: from eac.iafrica.com (196-7-119-230.iafrica.com [196.7.119.230]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id SAA00706 for ; Wed, 4 Dec 1996 18:08:34 -0800 (PST) Received: (from rnordier@localhost) by eac.iafrica.com (8.7.6/8.6.12) id EAA00419; Thu, 5 Dec 1996 04:05:24 +0200 (SAT) From: Robert Nordier Message-Id: <199612050205.EAA00419@eac.iafrica.com> Subject: Re: HELP: IIJ-PPP demand-dial with dynamic IP on both ends In-Reply-To: <199612042312.XAA11982@smtp-gw01.ny.us.ibm.net> from Steve Sims at "Dec 4, 96 06:11:49 pm" To: SimsS@IBM.Net Date: Thu, 5 Dec 1996 04:05:22 +0200 (SAT) Cc: questions@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Steve Sims wrote: > OK,I relent! I've been mucking with the -auto feature of iij-ppp for days > and can't get it to work reliably. I've come to the point where interactive > mode works flawlessly every time, but can't get the blasted thing to reliably > demand dial. > > I've looked at the ppp.conf.samples, .filter.samples, .linkup.samples until > I'm blue in the face. > > I've even had it sorta-work a couple of times -- the *FIRST* time a > demand-dial situation occurs -- but it won't work reliably on subsequent > demand-dials. > > Also, it seems to *NEVER* work if I: > # telnet localhost 3000 > PPP ON localhost> quit all > # > > and subsequently restart ppp -auto [system] from the command line. > > The biggest problem (I think) is that the addresses on both ends (ISP and > local) are dynamic - I can't figure out how to set up the ifaddr stuff to > accommodate this scenario. All of the references - source, manpages, > handbook and FAQ - seem to assume that I'll know, in advance, what the remote > side address will be. > > Does anyone have a working ppp.conf and / or ppp.linkup file that works in > -auto mode with both ends of the line having dynamic addresses? The following entry in `/etc/ppp/ppp.conf.iij' is probably pretty close to what you need: # # Here, we assume that IIJ server has 192.244.177.2 as their address. # This assumption may not be correct, but we'll fix it later. # Also, take a look at ppp.linkup. # # % ppp -auto iij-demand # # Use dummy ping to generate a call to IIJ. # # % ping 192.244.177.2 # iij-demand: set debug lcp set phone 0355118852 set login "TIMEOUT 5 login:-\\r-login: MyUserName word: MyPassword PPP" set ifaddr 0 192.244.177.2/20 add 0 0 192.244.177.2 First, delete the `add' line. The file `/etc/ppp/ppp.linkup.sample' contains (better) `add' logic, anyway, so just rename that file to `/etc/ppp/ppp.linkup'. You're not sure of either address, so you can indicate that by a '/0' after each address: set ifaddr 160.124.92.116/0 192.244.177.2/0 It shouldn't matter what addresses you use in `set ifaddr'. You should even be able to use the actual line above, because it says (in effect) "I really don't care whether you use these addresses or not". I found that using 0 (as in the example) for the local address didn't work well, and use a static address assigned to me for connecting to another ISP (the same `ifaddr' works for both). The local address won't be acceptable to this ISP, of course, but the '/0' gives the go-ahead to change it. This setup requires a dummy ping (as mentioned in the comments) to kick start it, but only on the first occasion following a reboot. Thereafter it will dial out automatically as required. -- Robert Nordier