From owner-freebsd-questions@FreeBSD.ORG Tue Nov 30 00:35:53 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8122116A4CE for ; Tue, 30 Nov 2004 00:35:53 +0000 (GMT) Received: from smtp.knology.net (smtp.knology.net [24.214.63.101]) by mx1.FreeBSD.org (Postfix) with SMTP id DF91E43D46 for ; Tue, 30 Nov 2004 00:35:52 +0000 (GMT) (envelope-from dkelly@HiWAAY.net) Received: (qmail 25928 invoked by uid 0); 30 Nov 2004 00:35:53 -0000 Received: from user-69-73-60-132.knology.net (HELO ?10.0.0.68?) (69.73.60.132) by smtp8.knology.net with SMTP; 30 Nov 2004 00:35:53 -0000 In-Reply-To: <20041129180602.5b4622a0.wmoran@potentialtech.com> References: <41AB94C9.7040901@yahoo.fr> <1713.207.111.173.106.1101766819.squirrel@webmail.dogbark.com> <41ABAAC1.6030901@yahoo.fr> <20041129180602.5b4622a0.wmoran@potentialtech.com> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: David Kelly Date: Mon, 29 Nov 2004 18:35:47 -0600 To: Yannack X-Mailer: Apple Mail (2.619) cc: FreeBSD_Questions FreeBSD_Questions cc: Bill Moran Subject: Re: Multiple NICs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Nov 2004 00:35:53 -0000 On Nov 29, 2004, at 5:06 PM, Bill Moran wrote: > Yannack wrote: >>> If that results in the route you wish then you might be able to >>> control the start order with this in /etc/rc.conf: >>> >>> network_interfaces="lo0 an0 fxp0" >>> >>> >> And this worked!!!! Hurray :) Thank you so much! >> How did you know this could do that??? I checked the man page, and >> it really isn't appearant... or is it? > > He read the source code. Lets kill two birds with one stone (one reply). Earlier Yannack said he didn't understand why the order of ifconfig_an0 and ifconfig_fxp0 didn't matter in /etc/rc.conf. The reason is that rc.conf doesn't contain what we would normally think of as executable code. Its a shell script which sets lots of variables which other shell scripts later look for. If the variable is found then its used. But the "looking for" order is already coded. By defining network_interfaces the automatic probe of interfaces is bypassed. This happens in /etc/network.subr > The great thing about open source, no matter how badly documented a > thing is, you can always read the code. Closed or open doesn't make much difference when its a shell script. :-) Now for a 3rd bird to kill in one reply I need to remind Yannack that apparently the *last* dhclient to run sets the default route. Next time dhclient renews the lease on an0 your default route will go the wrong way again until the ISP-issued lease renews on fxp0. I think it would be easiest to statically set the wireless IP address. After all it is *your* network, right? So you ought to be able to lay down your own law. With a static address you'll always know how to reach your FreeBSD box from the wireless side. Otherwise you ought to dig into dhclient's docs in order to prevent an0 from setting a default route. Just because it seems to be working now doesn't mean its time to stop, else you will end up with a typical PC-grade network. Am guessing based on the contents of man pages for dhcp-options and dhclient.conf but you need to put something like the following on the tail of /etc/dhclient.conf. Am thinking here that these are the only things you want from the wireless router. That if you don't ask for a router then you won't be given one. Undefined interfaces in /etc/dhclient.conf will continue to use the default values. interface "an0" { require ip-address, subnet-mask, broadcast-address; } -- David Kelly N4HHE, dkelly@HiWAAY.net ======================================================================== Whom computers would destroy, they must first drive mad.