From owner-freebsd-questions Wed Aug 6 16:49:47 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id QAA28770 for questions-outgoing; Wed, 6 Aug 1997 16:49:47 -0700 (PDT) Received: from nico.telstra.net (nico.telstra.net [139.130.204.16]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id QAA28763 for ; Wed, 6 Aug 1997 16:49:44 -0700 (PDT) Received: from freebie.lemis.com (gregl1.lnk.telstra.net [139.130.136.133]) by nico.telstra.net (8.6.10/8.6.10) with ESMTP id JAA08425; Thu, 7 Aug 1997 09:50:05 +1000 From: Greg Lehey Received: (grog@localhost) by freebie.lemis.com (8.8.7/8.6.12) id JAA01409; Thu, 7 Aug 1997 09:19:05 +0930 (CST) Message-Id: <199708062349.JAA01409@freebie.lemis.com> Subject: Re: Question: ppp -auto In-Reply-To: <199708062232.QAA02111@phantom.srccomp.com> from Dave Parks at "Aug 6, 97 04:32:44 pm" To: dparks@taurus.srccomp.com (Dave Parks) Date: Thu, 7 Aug 1997 09:19:05 +0930 (CST) Cc: freebsd-questions@FreeBSD.ORG Organisation: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8250 Fax: +61-8-8388-8250 Mobile: +61-41-739-7062 WWW-Home-Page: http://www.lemis.com/~grog X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Dave Parks writes: > Hi, > > I am having difficulty getting the -auto option for ppp to work (as I > understand it to). > > Here is the background: > > I tried setting up ppp to autoconnect to our server. I start ppp with: > > ppp -auto src > > Where 'src' is an entry in my ppp.conf file (ppp src without -auto works). > > Now, this is where I maybe missing something. From reading the documentation, > my understanding is that -auto will automatically connect the ppp link whenever > there is outgoing traffic. I cannot get it to work .... *but* if I first start > ppp manually, then quit (disconnecting the connection), then restart ppp with > -auto, everything works fine (it remains inactive while there isn't any > connection, and then automatically dials/connects to the server when there is > outgoing traffic). > > Do anyone have any idea why I have to first start ppp manually and then restart > ppp -auto? Is there a setting/configuration problem that I'm missing (I'm > running the 2.2.2 release of FreeBSD from Walnut Creek). In order for ppp -auto to detect outgoing packets, it first has to receive them. For this to happen, there must be a route which points to the ppp interface. This means that you need to know at least the IP address which will be assigned to the interface (in other words, this won't work with a dynamically allocated address). When you start the system, you need to issue at least the following commands: ifconfig tun0 my-ip-address his-ip-address route add default his-ip-address Normally, you'd do this in sysconfig: network_interfaces=".... tun0" # include tun0 in the list of # network interfaces ifconfig_tun0="my-ip-address his-ip-address" # see above static_routes="route_tun0" # add route_tun0 to anything else you # might have here route_tun0="default his-ip-address" # see above Greg