From owner-freebsd-current@FreeBSD.ORG Fri Jul 15 01:05:54 2005 Return-Path: X-Original-To: freebsd-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 CF8B916A41C for ; Fri, 15 Jul 2005 01:05:54 +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 61B1B43D49 for ; Fri, 15 Jul 2005 01:05:54 +0000 (GMT) (envelope-from sam@errno.com) Received: from [66.127.85.94] ([66.127.85.94]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id j6F15nms096318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Jul 2005 18:05:50 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <42D70C0B.9090802@errno.com> Date: Thu, 14 Jul 2005 18:06:19 -0700 From: Sam Leffler Organization: Errno Consulting User-Agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Oberman References: <20050714182136.071B35D07@ptavv.es.net> In-Reply-To: <20050714182136.071B35D07@ptavv.es.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: Problems with OpenBSD dhclient 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: Fri, 15 Jul 2005 01:05:54 -0000 Kevin Oberman wrote: > Since switching from the ISC DHCP client to OpenBSD on my laptop, I've > been having some issues with managing my network connection. I'm running > 7.0-current built yesterday (kernel and world.) > > On a typical day I boot my system on wired connection with a static > address and gateway. Everything works fine. DHCP is not playing, yet. > > When I go to a meeting, I want to switch to the wireless network. In the > past I simply entered 'dhclient wi0' and I was up and running. The > wireless uses DHCP, so dhclient would get the address and gateway along > with DNS servers and instantiate these and I would be connected. The > default route that had been in use previously was replaced with the DHCP > supplied gateway. Switching back was a simple matter of '/etc/rc.d/netif > start fxp0'. > > While on the wireless network, I could roam with only brief loss of > connectivity when I moved from one AP to another, but the wireless > system soon "finds" me and I continue on-line with the same address and > gateway. Even my ssh sessions are maintained. > > Now life is not so nice with the OpenBSD dhclient. > > When I switch to wireless, dhclient no longer replaces the default > route. I need to take down my wired connection and flush routes before > starting dhclient. Not a big deal, but an annoyance. This sounds like the issue with dhclient not deleting it's routes on termination. > > More serious is that I can't roam. When I move between APs, dhclient > exits and I need to manually re-start it. I lose my SSH sessions. Ugh! This should not be happening; dhclient should get a disassociate event, drop the lease, then get an associate when you join the new ap and immediately grab a new lease. In fact this was the primary reason I wanted to switch to this new code in the first place. > > Worse, I occasionally see my association drop momentarily when I am > simply sitting and typing. Once again, dhclient dies and I must manually > restart it and then re-establish my SSH and recover anything broken when > the connection dropped. This is fairly serious! I don't understand what > causes this, but it is infrequent which makes it hard to catch. > > It looks like killing dhclient when the interface drops is not a good > idea. At very least, it needs to give a little time for re-association > before dropping the DHCP client. Something is busted; I'll need to investigate. If you want to help you can run ieee80211watch (from tools/tools/ath) while things happen and note the events that get sent by the kernel. Sam