From owner-freebsd-current@FreeBSD.ORG Sun Jul 31 00:16:00 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 BB41F16A41F for ; Sun, 31 Jul 2005 00:16:00 +0000 (GMT) (envelope-from minimarmot@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EE1F43D45 for ; Sun, 31 Jul 2005 00:16:00 +0000 (GMT) (envelope-from minimarmot@gmail.com) Received: by wproxy.gmail.com with SMTP id 36so820277wra for ; Sat, 30 Jul 2005 17:15:59 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=LMQn2DbpgbtsP+g6f1K0v2XeDvV9lIjHJeuSXSLJ4SBTmYEOCK2e5Cn162rsLwUtO2RXD+R0IdY9Hb6wuWBjw7yixyHX5Flzc1PGaYXTmBgMc839AUGqaHg3+uAObeKsL95x0RICV9LT2WSrRwUD+bBHp74BWdgY2FT9mWZ2iBg= Received: by 10.54.61.16 with SMTP id j16mr638480wra; Sat, 30 Jul 2005 17:15:59 -0700 (PDT) Received: by 10.54.44.33 with HTTP; Sat, 30 Jul 2005 17:15:59 -0700 (PDT) Message-ID: <47d0403c05073017156a482fab@mail.gmail.com> Date: Sun, 31 Jul 2005 00:15:59 +0000 From: Ben Kaduk To: Sam Leffler In-Reply-To: <42EBC525.4040906@errno.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <42EAD325.60707@errno.com> <47d0403c050729223074ddf67d@mail.gmail.com> <42EBC525.4040906@errno.com> Cc: current@freebsd.org Subject: Re: dhclient and wpa_supplicant X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ben Kaduk List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2005 00:16:00 -0000 On 7/30/05, Sam Leffler wrote: > Ben Kaduk wrote: > > On 7/30/05, Sam Leffler wrote: > > > >>Brooks fixed a bunch of bugs in dhclient and I just committed an > >>important fix to wpa_supplicant to work right when wireless cards are > >>ejected (previously it would loop). > >> > >>I also tested that dhclient does the right thing for roaming between > >>ap's--switching causes dhclient to immediately collect a new lease. > >> > >>I just ran tests with wpa_supplicant and found that it does appear to > >>handle open ap's properly. > >> > >>Everything except the wpa_supplicant changes have been MFC'd to RELENG_= 6 > >>for the 6.0RC2 build that's going to happen soon (I'm hoping to get re > >>to approve the wpa_supplicant changes). > >> > >>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. If something doesn't work > >>right please try to give steps to reproduce the problem. Otherwise > >>please provide detailed info include ifconfig output. Remember that > >>dhclient logs info to /var/log/messages and you should also see link > >>state change msgs there too. > >> > >> Sam > >>_______________________________________________ > >>freebsd-current@freebsd.org mailing list > >>http://lists.freebsd.org/mailman/listinfo/freebsd-current > >>To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.o= rg" > >> > > > > > > > > Well, I don't know if this is something in the code or just operator > > incompotence, but I'm having some problems with dhclient on a wireless > > interface. I've got current from last night: > > > > prolepsis# uname -a > > FreeBSD prolepsis.math.uiuc.edu 7.0-CURRENT FreeBSD 7.0-CURRENT #6: > > Fri Jul 29 04:30:11 UTC 2005 > > kaduk@prolepsis.math.uiuc.edu:/usr/obj/usr/src/sys/PROLEPSIS i386 > > > > and I'm trying to connect to a friend's ap using wep. My ndis card > > seems to be recognized just fine: > > > > ndis0: mem > > 0xfaff6000-0xfaff7fff irq 9 at device 3.0 on pci2 > > ndis0: NDIS API version: 5.0 > > ndis0: Ethernet address: 00:90:4b:2d:46:ce > > > > When I issue an: > > > > prolepsis# ifconfig ndis0 inet up ssid 'NetworkXcAe5@r' wepmode on > > wepkey 0xdeadc0de > > > > my interface associates fine, giving me this: > > > > prolepsis# ifconfig ndis0 > > ndis0: flags=3D8843 mtu 1500 > > inet6 fe80::290:4bff:fe2d:46ce%ndis0 prefixlen 64 scopeid 0x3 > > ether 00:90:4b:2d:46:ce > > media: IEEE 802.11 Wireless Ethernet autoselect > > status: associated > > ssid NetworkXcAe5@r bssid 00:12:17:1d:f7:08 > > authmode OPEN privacy ON deftxkey UNDEF wepkey 1:40-bit txpowma= x 100 >=20 > add weptxkey 1 or deftxkey 1--note "deftxkey UNDEF" above. >=20 > > > > but when I run: > > > > prolepsis# dhclient ndis0 > > DHCPDISCOVER on ndis0 to 255.255.255.255 port 67 interval 8 > > DHCPDISCOVER on ndis0 to 255.255.255.255 port 67 interval 9 > > DHCPDISCOVER on ndis0 to 255.255.255.255 port 67 interval 16 > > DHCPDISCOVER on ndis0 to 255.255.255.255 port 67 interval 9 > > DHCPDISCOVER on ndis0 to 255.255.255.255 port 67 interval 11 > > DHCPDISCOVER on ndis0 to 255.255.255.255 port 67 interval 8 > > No DHCPOFFERS received. > > No working leases in persistent database - sleeping. > > > > prolepsis# ifconfig ndis0 > > ndis0: flags=3D8843 mtu 1500 > > inet6 fe80::290:4bff:fe2d:46ce%ndis0 prefixlen 64 scopeid 0x3 > > inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255 > > ether 00:90:4b:2d:46:ce > > media: IEEE 802.11 Wireless Ethernet autoselect > > status: associated > > ssid NetworkXcAe5@r bssid 00:12:17:1d:f7:08 > > authmode OPEN privacy ON deftxkey UNDEF wepkey 1:40-bit txpowma= x 100 > > > > > > dhclient doesn't seem to pick it up. I know this ap is actually > > running a dhcp server; it works on darwin. > > > > I have read that using ifconfig for wireless (encryption?) is not the > > way of the future, that I should be using wpa_supplicant, but I > > haven't been able to succesfully modify a config file to get it to > > work, and google wasn't very helpful in finding a tutorial or > > instructions for wpa_supplicant on freebsd. The archives weren't > > terribly helpful, either -- this is something that would be on > > freebsd-questions, right? Anyways, if someone could point me to a > > tutorial for wpa_supplicant, I can check that and see if I get better > > results, or if you want further information about my configuration, I > > can get that too. >=20 > There's supposed to be an update coming to the wireless setup section of > the freebsd handbook. I'd also like to see sysinstall do a better job > of setting up wireless interfaces (until the new installer is ready) and > I lobbied for a SoC project to build a GUI app to do this but w/o luck. >=20 > Setting up wpa_supplicant is actually not too bad; you just need an > /etc/wpa_supplicant.conf file that describes the networks you hook up > to. If you look in /usr/src/contrib/wpa_supplicant/wpa_supplicant.conf > there's an extensive set of examples you should be able to crib from. > Test things by running wpa_supplicant directly with something like: >=20 > wpa_supplicant -i ath0 -d -c /etc/wpa_supplicant.conf >=20 > and when you're happy configure stuff to start automatically by adding a > line to /etc/rc.conf like: >=20 > ifconfig_ath0=3D"WPA DHCP" >=20 > The trickiest part is configuring 802.1x. I'm not sure how well ndis > drivers hookup to these tools. The only driver I know works well in all > configurations is ath. >=20 > > > > Thanks for putting in all this effort. > > > > Ben Kaduk > > > > >=20 >=20 Thanks for the helpful responses -- adding 'weptxkey 1' to my ifconfig line allowed dhclient to succesfully get a lease. Ben Kaduk