From owner-freebsd-questions Wed Aug 6 18:29:23 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id SAA05403 for questions-outgoing; Wed, 6 Aug 1997 18:29:23 -0700 (PDT) Received: from jsbach.n2.net (jsbach.n2.net [207.113.132.22]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id SAA05391 for ; Wed, 6 Aug 1997 18:29:20 -0700 (PDT) Received: (from fpm@localhost) by jsbach.n2.net (8.8.5/8.6.12) id SAA01268; Wed, 6 Aug 1997 18:29:01 -0700 (PDT) Message-ID: <19970806182901.00396@jsbach.n2.net> Date: Wed, 6 Aug 1997 18:29:01 -0700 From: Frank MacLachlan To: Greg Lehey Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Question: ppp -auto References: <199708062232.QAA02111@phantom.srccomp.com> <199708062349.JAA01409@freebie.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.67 In-Reply-To: <199708062349.JAA01409@freebie.lemis.com>; from Greg Lehey on Thu, Aug 07, 1997 at 09:19:05AM +0930 Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Thu, Aug 07, 1997 at 09:19:05AM +0930, Greg Lehey wrote: > [snip] > > 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 I do autodial ppp w/o any modifications to /etc/sysconfig. I fire off ppp in /etc/rc.local and it dials out when I go outside of my local network. Here's my /etc/ppp.conf file: ------------------------------------ default: set device /dev/cuaa1 set speed 115200 disable lqr deny lqr disable vjcomp deny vjcomp set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATE1Q0 OK-ATS27=32-OK \\dATDT\\T TIMEOUT 40 CONNECT" # USR server w/ static IP addr on my end, dynamic IP addr on far end of link. n2f_new: set phone 1234567 set login "TIMEOUT 10 gin:-BREAK-gin: fixed-ip-login-name word: my-password" set timeout 900 set ifaddr 207.111.222.333 207.111.222.1/0 255.255.255.0 add 0 0 207.111.222.1 # USR server w/ dynamic IP addr on both ends of link. n2d_new: set phone 1234567 set login "TIMEOUT 10 gin:-BREAK-gin: dynamic-ip-login-name word: my-password" set timeout 900 set ifaddr 207.111.222.333/0 207.111.222.1/0 255.255.255.0 add 0 0 207.111.222.1 ------------------------------------ The trick is to establish a route that goes to the ppp device. I don't care if the IP addresses are correct, therefore I use 207.111.222.1/0 which indicates that 0 bits of the IP address are assumed correct. The 207.111.222 value is the address of the ISP's class C network; the 1 at the end is arbitrary and the correct value will be filled in the linkup phase. Here's my ppp.linkup: ------------------------------------ MYADDR: delete ALL add 0 0 HISADDR ------------------------------------ -- Frank MacLachlan (fpm@n2.net) N2 Networking, San Diego, CA