From owner-freebsd-current@FreeBSD.ORG Tue Mar 1 02:44:55 2005 Return-Path: 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 21E4B16A4CE for ; Tue, 1 Mar 2005 02:44:55 +0000 (GMT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC52843D31 for ; Tue, 1 Mar 2005 02:44:52 +0000 (GMT) (envelope-from sam@errno.com) Received: from [66.127.85.92] ([66.127.85.92]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id j212inms005340 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 28 Feb 2005 18:44:50 -0800 (PST) (envelope-from sam@errno.com) Message-ID: <4223D74C.1070508@errno.com> Date: Mon, 28 Feb 2005 18:45:32 -0800 From: Sam Leffler Organization: Errno Consulting User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: incmc@gmx.de References: <4221C746.8010204@gmx.de> <20050228190223.GC438@odin.ac.hmc.edu> <59942.10.0.0.1.1109628148.squirrel@10.0.0.1> In-Reply-To: <59942.10.0.0.1.1109628148.squirrel@10.0.0.1> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-current@freebsd.org Subject: Re: dhclient with non present devices X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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, 01 Mar 2005 02:44:55 -0000 incmc@gmx.de wrote: >>Starting and stopping dhclient on removable interfaces is taken care of >>by devd which calls the /etc/pccard_ether script. You should have >>ifconfig_ath="DHCP" and removable_interfaces="ath0" in your >>/etc/rc.conf for this to happen. > > > Hi, > > thanks a lot, works great. However when deactivating my ath card sometimes > freebsd doesn't renew dhclient for fxp0. So the system stays disconnected. > Any idea? As far as I understand it, dhlcient only gets restarted, when > ath0 is comming up, not when it is going down. So the default routes stay > on ath0, even if it's not present any more... There is a single dhclient process. It gets restarted whenever the set of interfaces that need dhcp changes. In theory this should do the right thing. In practice I've seen cases where the default route didn't move when an interface went away. I suspect this is a problem in the dhclient script or maybe pccard_ether. Regardless, the question of where to point the default route when there are multiple potential interfaces is not currently handled as well as it could. You can hack the dhclient scripts to impose your own policy but I'd prefer to see something prepackaged. Having kernel support for multiple default routes would also simplify things. Sam