Date: Wed, 6 Aug 1997 18:29:01 -0700 From: Frank MacLachlan <fpm@n2.net> To: Greg Lehey <grog@lemis.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Question: ppp -auto Message-ID: <19970806182901.00396@jsbach.n2.net> In-Reply-To: <199708062349.JAA01409@freebie.lemis.com>; from Greg Lehey on Thu, Aug 07, 1997 at 09:19:05AM %2B0930 References: <199708062232.QAA02111@phantom.srccomp.com> <199708062349.JAA01409@freebie.lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970806182901.00396>