From owner-freebsd-hackers Fri Aug 11 07:47:11 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id HAA22159 for hackers-outgoing; Fri, 11 Aug 1995 07:47:11 -0700 Received: from apollo.hq.nasa.gov (apollo.hq.nasa.gov [131.182.121.87]) by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id HAA22148 for ; Fri, 11 Aug 1995 07:47:07 -0700 Received: from wirehead.hq.nasa.gov (wirehead.hq.nasa.gov [131.182.121.88]) by apollo.hq.nasa.gov (8.6.12/8.6.12) with ESMTP id OAA04814 for ; Fri, 11 Aug 1995 14:48:22 GMT Received: from localhost (cshenton@localhost) by wirehead.hq.nasa.gov (8.6.12/8.6.12) with SMTP id OAA05719 for ; Fri, 11 Aug 1995 14:48:21 GMT Message-Id: <199508111448.OAA05719@wirehead.hq.nasa.gov> X-Authentication-Warning: wirehead.hq.nasa.gov: cshenton owned process doing -bs X-Authentication-Warning: wirehead.hq.nasa.gov: Host localhost didn't use HELO protocol To: freebsd-hackers@freebsd.org Subject: iijppp working with netmasks and net routing Date: Fri, 11 Aug 1995 10:48:21 -0400 From: Chris Shenton Sender: hackers-owner@freebsd.org Precedence: bulk A few days ago, I posted about problems with kernel pppd not quitting on modem hangup. I then said I was having problems getting usermode iijppp to set the netmask so I can route around our subnets. I've got the problem fixed now, and thought I'd share my configs with anyone else who might be playing on this. We have a Class C address space which we have carved up into 16 16-host subnets. We running ppp to our houses where we have little networks, so we need proper subnet masks for routing. A number of folks suggested ifconfigging tun0, but this appears to be reset at ppp startup. An examination of the code indicated that the `ifaddr' command would accept a subnet mask, and that's what I'm using now. For a diagram of the net, see http://www-dc.nsi.nasa.gov/~mnewell/mcnet.html It's current except I'm now using a different address for iij ppp than the one I used with kernel pppd -- this was necessary to avoid confusing the routing. At present, I've only gotten this to work on dialout to my house, which is SunOS running pppd, then networked to a FreeBSD box via ether. I have not yet tried getting in from home, because I'm not sure how to tell iijppp how to set the netmask nor how to route my net. Suggestions welcome. I invoke it with ``ppp -auto absinthe'', and have no timeout but expect this to redial if the modems drop the connection. Here's my /etc/ppp/ppp.conf file; I'm not using a ppp.linkup. # $Id: ppp.conf,v 1.4 1995/08/11 14:27:01 cshenton Exp $ # # This is for user-mode IIJPPP, not kernel-mode pppd. # # For daemon, log into a script which invokes ``ppp -direct''; # for this you must turn off echo and responses in modem! # # NOTES: # 1. Undocumented netmask for `ifaddr'; see command.c; use: # set ifaddr [/wantbits] [/wantbits] # 2. Add route with: # add # 3. For doc indicates you can use generic `HISADDR'. ############################################################################### ############################################################################### # Generic setup information, *always* executed when PPP is invoked. default: disable lqr # not documented deny lqr # not documented set speed 115200 # Let's rock! set timeout 0 # disable idle timer set login "TIMEOUT 5 :-\\r-: \\U word: \\P" # sane default set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATE1Q0 OK-AT-OK \\dATDT\\T TIMEOUT 40 CONNECT" ############################################################################### # Chris's Sun running SunOS. # Later want PAP and CHAP authentication. absinthe: set debug phase lqm lcp # chat set line /dev/cuaa0 set phone 9,555-1212 set authname pppuser set authkey MyPasswd set login "TIMEOUT 5 ogin:-\\r-ogin: \\U word: \\P" set ifaddr 198.116.75.241/28 198.116.75.33/28 255.255.255.240 add 198.116.75.32 255.255.255.240 198.116.75.33 ############################################################################### # Mike... somewhere. mike: set line /dev/cuaa1