dhclient behaviour on link status changes

Peter Jeremy peterjeremy at acm.org
Thu Apr 5 04:45:03 UTC 2012


On 2012-Apr-05 13:22:37 -0700, YongHyeon PYUN <pyunyh at gmail.com> wrote:
>On Thu, Apr 05, 2012 at 12:39:46PM +1000, Peter Jeremy wrote:
>> On 2012-Apr-05 07:17:49 +1000, Peter Jeremy <peterjeremy at acm.org> 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.
>> 
>> 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).

-- 
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20120405/291a7791/attachment.pgp


More information about the freebsd-net mailing list