From owner-freebsd-net@FreeBSD.ORG Thu Apr 5 04:45:03 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 95E13106566C for ; Thu, 5 Apr 2012 04:45:03 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail34.syd.optusnet.com.au (mail34.syd.optusnet.com.au [211.29.133.218]) by mx1.freebsd.org (Postfix) with ESMTP id 205B98FC0A for ; Thu, 5 Apr 2012 04:45:02 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c220-239-251-180.belrs5.nsw.optusnet.com.au [220.239.251.180]) by mail34.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q354j00H011782 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 5 Apr 2012 14:45:01 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.5/8.14.4) with ESMTP id q354j0wN093314; Thu, 5 Apr 2012 14:45:00 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.5/8.14.5/Submit) id q354ixMY093307; Thu, 5 Apr 2012 14:44:59 +1000 (EST) (envelope-from peter) Date: Thu, 5 Apr 2012 14:44:59 +1000 From: Peter Jeremy To: YongHyeon PYUN Message-ID: <20120405044459.GB63311@server.vk2pj.dyndns.org> References: <20120404211749.GA16579@server.vk2pj.dyndns.org> <20120405023946.GA63311@server.vk2pj.dyndns.org> <20120405202237.GC14289@michelle.cdnetworks.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lEGEL1/lMxI0MVQ2" Content-Disposition: inline In-Reply-To: <20120405202237.GC14289@michelle.cdnetworks.com> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-net@freebsd.org Subject: Re: dhclient behaviour on link status changes X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Apr 2012 04:45:03 -0000 --lEGEL1/lMxI0MVQ2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Apr-05 13:22:37 -0700, YongHyeon PYUN wrote: >On Thu, Apr 05, 2012 at 12:39:46PM +1000, Peter Jeremy wrote: >> On 2012-Apr-05 07:17:49 +1000, Peter Jeremy wrote: >> >/etc/devd.conf includes a rule to start dhclient when an Ethernet or >> >802.11 interface reports "link up", with a comment: "No link down rule >> >exists because dhclient automatically exits when the link goes down." >> >IMHO, this is the desired behaviour, unfortunately it's not the way >> >dhclient actually behaves. In my experience, dhclient will exit when >> >the interface goes down but ignores link status changes. >>=20 >> I found an easy way to correct the behaviour & submitted bin/166656 >Hmm, wouldn't this make dhclient die when speed/duplex/flow control >of established connection is changed by admin or remote link partner? >For instance, >#ifconfig foo0 media mdiaopt flow If the speed/duplex/flow control change triggered a "LINK DOWN" "LINK UP" kernel message then, yes, that would cause dhclient to restart. I think that depends on the NIC. I guess a potential work-around would be to have dhclient ignore outages shorter than a configurable value. I hadn't considered that because it's not something that I ever do on a running system. (This investigation was prompted by my ISP's approach to address grooming - they just remotely reboot the cablemodem and expect clients to re-DHCP. Existing valid leases are just ignored. Since the FreeBSD dhclient ignores the link outage, I just lose Internet connectivity until I manually restart DHCP). --=20 Peter Jeremy --lEGEL1/lMxI0MVQ2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk99I0sACgkQ/opHv/APuIcGjwCeJqaxwJVIUe3od7C5NdFNjznC 46YAn3m27R/2mf5uxinJv09CQChyUWvq =TCQI -----END PGP SIGNATURE----- --lEGEL1/lMxI0MVQ2--