From owner-freebsd-current@FreeBSD.ORG Mon Aug 1 15:35:03 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 26E7E16A41F for ; Mon, 1 Aug 2005 15:35:03 +0000 (GMT) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (adsl-63-193-123-122.dsl.snfc21.pacbell.net [63.193.123.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5090C43D4C for ; Mon, 1 Aug 2005 15:35:02 +0000 (GMT) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (localhost [127.0.0.1]) by bunrab.catwhisker.org (8.13.3/8.13.3) with ESMTP id j71FZ1YZ099797 for ; Mon, 1 Aug 2005 08:35:01 -0700 (PDT) (envelope-from david@bunrab.catwhisker.org) Received: (from david@localhost) by bunrab.catwhisker.org (8.13.3/8.13.1/Submit) id j71FZ1fU099796 for current@freebsd.org; Mon, 1 Aug 2005 08:35:01 -0700 (PDT) (envelope-from david) Date: Mon, 1 Aug 2005 08:35:01 -0700 From: David Wolfskill To: current@freebsd.org Message-ID: <20050801153501.GC26920@bunrab.catwhisker.org> Mail-Followup-To: David Wolfskill , current@freebsd.org References: <42EAD325.60707@errno.com> <20050801152156.GB90588@teardrop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050801152156.GB90588@teardrop.org> User-Agent: Mutt/1.4.2.1i Cc: Subject: Re: dhclient and wpa_supplicant X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2005 15:35:03 -0000 On Mon, Aug 01, 2005 at 11:21:56AM -0400, James Snow wrote: > On Fri, Jul 29, 2005 at 06:08:53PM -0700, Sam Leffler wrote: > > > > So the question is what are the outstanding issues with dhclient and > > wpa_supplicant? I'm mostly concerned with wireless devices but feel > > free to talk about wired interfaces too. > > My biggest outstanding complaint is when booting with a wired network > and no present wireless network, if dhclient has any recorded leases for > the wireless interface, it will attempt to use the most recent one and > blows away the default gateway for the wired network. I then have to manually > 'netif stop ath0' and 'netif restart em0.' > > Not sure what the best solution is.... For reasons that aren't relevant to this discussion, I am not running the code in question. However, when I got my current laptop, it forced me to re-think how I handle connectivity: thitherto, I had placed whatever type of NIC I wanted in a PCMCIA slot; FreeBSD saw the new device, andthat was straightforward. The current laptop has both wired and wireless NICs built in; short of surgery on the machine, each will always appear available. And there are times when I do not want to use the wireless NIC, even if I'm in range of an AP with which I could associate: here at home, for example, my APs are on a "guest" network that I don't trust very much, so if I want to use certain services, I'll use the "trused" wired net. I adopted an approach (encoded in a Perl script I cobbled up) of enumerating a set of regexen for wireless NICs -- all others are treated as "wired." I then check to see if there's a "link" condition on any wired NIC; if there is, I use that NIC preferentially. It's only if there's no link on a wired NIC taht I try to use a wireless one. The rationale is that connecting a wire to a wired NIC is something that requires a bit more than merely accidental proximity; I assume(!) that I only plug the wire in if I want to use the NIC. I don't know if this idea is useful for others or if it's usable at all for the situation in question; I offer it as an approach that works pretty well for me. (The above-cited Perl script also, for wireless NICs, invokes another Perl script to handle acquiring a link -- dealing with SSIDs, WEP, whatever -- and then for either kind of NIC will invoke dhclient.) Peace, david -- David H. Wolfskill david@catwhisker.org Any given sequence of letters is a misspelling of a great many English words. See http://www.catwhisker.org/~david/publickey.gpg for public key.