From owner-freebsd-mobile@FreeBSD.ORG Mon Apr 7 15:11:16 2003 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D7DA937B401 for ; Mon, 7 Apr 2003 15:11:16 -0700 (PDT) Received: from bast.unixathome.org (bast.unixathome.org [66.11.174.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22A3343F3F for ; Mon, 7 Apr 2003 15:11:16 -0700 (PDT) (envelope-from dan@langille.org) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id AA43D3D28; Mon, 7 Apr 2003 18:11:15 -0400 (EDT) From: "Dan Langille" To: freebsd-mobile@freebsd.org Date: Mon, 07 Apr 2003 18:11:15 -0400 MIME-Version: 1.0 Message-ID: <3E91BF43.25196.C0C3731@localhost> Priority: normal In-reply-to: <20030407185520.GA86072@laptop.lambertfam.org> References: <3E91393A.7398.A009B14@localhost> X-mailer: Pegasus Mail for Windows (v4.02a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Subject: Re: The right way to do DHCP with wi/ed? X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2003 22:11:17 -0000 On 7 Apr 2003 at 14:55, Scott Lambert wrote: > On Mon, Apr 07, 2003 at 08:39:22AM -0400, Dan Langille wrote: > > What is the correct way to do DHCP with wi0? I've been trying > > various methods, but the only solution I've found is to do this: > > > > /etc/rc.conf: > > ifconfig_wi0="DHCP" > > pccard_enable="YES" > > dhcp_program=/tmp/foo > > > > /tmp/foo: > > ( /sbin/dhclient -d $* & ) > /tmp/foo.out 2>&1 > > > > If I don't use /tmp/foo, dhclient hangs. So far, the dicussion on > > the ISC DHCP client list hasn't found a solution. The lease is > > granted, but wi0 never gets an IP addresses. If interested, the > > thread is at http://marc.theaimsgroup.com/?t=104950219300003&r=1&w=2 > > I use the {start|stop}_if.* files for my wi0 setup, my fxp0 too. > > start_if.wi0: > #!/bin/sh > #/sbin/ifconfig wi0 up > /sbin/ifconfig wi0 wepkey 0xXXXXXXXXXXXXXXXXXXXXXXXXXX wepmode on > #echo "sleeping 15 seconds to allow time to associate..." #sleep 15 > dhclient -pf /var/run/dhclient.wi0.pid wi0 Thank you. This is quite helpful. I see my "sleeping 15s ..." message... twice. The first occurs just after "wi0: Lucent Firmware: Station 8.10.0". The second occurs just after "Doing initial network setup: hostname ipmon ipfilter." Back to the original problem: wi0 doesn't get an IP address. dhclient is running. /var/dbh/dhclient.leases has the expected values (I deleted it before rebooting). > stop_if.wi0: > #!/bin/sh > /bin/kill `cat /var/run/dhclient.wi0.pid` I have similar. However, If I remove the card, dhclient is not killed but wi0 disappears from the ifconfig output. If the card is then inserted, I don't see the "sleeping 15s" message. And ifconfig still doesn't show a wi0 interface. This is what I see: [root@laptop:~] # wi0: timeout in wi_seek to fc80/0; last status ffff wi0: timeout in wi_seek to fc80/0; last status ffff wi0: detached pccard: card removed, slot 0 Apr 7 17:57:56 laptop /kernel: stray irq 3 Apr 7 17:57:56 laptop dhclient: send_packet: No route to host Apr 7 17:57:56 laptop dhclient: receive_packet failed on wi0: No route to host In fact, unless wi0 is inserted before booting, I can't get it to work. Possible clues: During the boot process, the "ifconfig wi0" information appears on the screen but without an IP address, and with the wrong channel (and "status: no carrier"). The SSID, wep info etc, are all there. Clues please? -- Dan Langille : http://www.langille.org/