From owner-freebsd-current@FreeBSD.ORG Tue Jul 5 16:16:37 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 2BB6316A41C for ; Tue, 5 Jul 2005 16:16:37 +0000 (GMT) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC96A43D49 for ; Tue, 5 Jul 2005 16:16:36 +0000 (GMT) (envelope-from sam@errno.com) Received: from [66.127.85.91] ([66.127.85.91]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id j65GGZms036945 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 5 Jul 2005 09:16:36 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <42CAB393.3010406@errno.com> Date: Tue, 05 Jul 2005 09:21:39 -0700 From: Sam Leffler User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050327) X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-1?Q?Erik_N=F8rgaard?= References: <42CA4263.9080409@locolomo.org> In-Reply-To: <42CA4263.9080409@locolomo.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: current@freebsd.org Subject: Re: dhclient.conf for ath wireless 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: Tue, 05 Jul 2005 16:16:37 -0000 Erik Nørgaard wrote: > Hi, > > This is posibly just missing documentation, but it may be a bug or > undesirable behaivour. I have read the ath, ifconfig, dhclient and > dhclient.conf man pages, searched the web and asked in questions@, but > not found an answer. > > I am running -CURRENT with the new port of dhclient from OpenBSD. The > problem is that dhclient most often associante with my neighbours AP > instead of mine. > > The man-pages mentions the "media" statement and according to the > examples I can find in google I should add an entry like this: > > interface "ath0" { > media "ssid MYAP mode 11g"; > } > > in dhclient.conf. But on boot, dhclient enters into an infinite loop > bringing up and down the interface, until I break it. I have to manually > run "ifconfig ath0 ssid MYAP mode 11g" and then start dhclient manually > to force it to associate correctly with MYAP. The media support in dhclient is never going to work for wireless devices under 6.x. That it worked before was mostly an accident (trust me). I've had some discussions with other folks and we're pretty much in agreement that we should deprecate it's usage for wireless devices. My feeling is that dhclient should not be involved in stuff like this; that it even grew media support was unfortunate. If you want to do things like setup per-ssid static wep keys then wpa_supplicant is the intended mechanism. > > Can anyone point me to the correct documentation? > > I recall seeing one example which mentions something like this entry in > rc.conf: > > interface_ath0="ssid MYAP mode 11g DHCP" > > Is this correct? If you have only one ap then I believe this should work. > > Also, according to the examples I have seen, I should be able to list > multiple wireless networks with the media option in dhclient.conf and > dhclient will try them in order. > > This is cool since I can then configure my nic to associate depending on > where I am. This seems not to be posible if the configuration goes into > rc.conf. > > I have a 3Com wireless NIC and a comtrend AP. My dhcp server is isc-dhcp > v.3 running on FBSD 5.4. I usually get associated with my neighbours > 3Com AP running with a default setup. The way to do this is with wpa_supplicant. You specify a network block for each potential ssid in the wpa_supplicant.conf file: network={ ssid="MYAP" key_mgmt=NONE wep_key1=0102030405" wep_tx_keyidx=1 } Unfortunately the existing code in CVS does not handle this correctly. I've got commits pending re approval to make it work right. Sam