Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2012 09:16:03 -0600
From:      Ian Lepore <freebsd@damnhippie.dyndns.org>
To:        lev@freebsd.org
Cc:        Garrett Cooper <yanegomi@gmail.com>, Peter Jeremy <peterjeremy@acm.org>, freebsd-current@freebsd.org, current@freebsd.org
Subject:   Re: r239356: does it mean, that synchronous dhcp and dhcplcinet with disabled devd gone?
Message-ID:  <1345562163.27688.347.camel@revolution.hippie.lan>
In-Reply-To: <1049151425.20120821190433@serebryakov.spb.ru>
References:  <20120821095527.GA33206@hell.ukr.net> <67977762.20120821154035@serebryakov.spb.ru> <1959717636.20120821155308@serebryakov.spb.ru> <201208210934.31484.jhb@freebsd.org> <1049151425.20120821190433@serebryakov.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2012-08-21 at 19:04 +0400, Lev Serebryakov wrote:
> Hello, John.
> You wrote 21 августа 2012 г., 17:34:31:
> 
> JB> Humm.  devd is the more common case, and we explicitly don't use devd to start
> JB> dhclient on boot even when devd is enabled (so out of the box dhcp would first
> JB> be started by rc, but would be restarted by devd).
>   It  is  strange,  and,  maybe, changed some time ago, because when I
> disable "devd" on my NanoBSD-based router (about year or year and half
> ago), I've spent several hours to understand, why dhclient doesn't
> start anymore. And I need to add this to rc.conf:
> 
> synchronous_dhclient="YES"
> 
> JB> Another option is to rework dhclient to work like it does on OpenBSD where it
> JB> renews its lease if the link bounces, but to not exit when the link goes down.
>   Yes, it looks like proper solution.
> 
> JB> That case would fix the currently broken case that you unplug your cable, take
> JB> your laptop over to another network (e.g. take it home if suspend/resume
> JB> works), then plug it back in and are still stuck with your old IP.
>   Yep. But _committed_ solution is very bad. For example, my ISP's
>  switch lost link every second day for second or two. I don't want to
>  lost all open connections, firewall state, etc, and to restart
>  dhclinet by hands, especially, when I'\m not at home anf my
>  girlfriend is. in such case. Another good example was provided by
>  Slava -- WiFi could disconnect for 10-15 seconds for multiple
>  reasons, and dropping of IP and all connections in such case is MAJOR
>  headache.
> 

I don't understand all this talk that makes it sound like you lose your
existing network connections when dhclient exits.  I don't experience
anything like that at all, and never have.  I just pulled the network
cable on this machine, did "sudo killall dhclient", plugged the network
back in, I still have all my ssh connections to the world in a dozen
open windows and can interact with any of them.  Then I did "sudo
dhclient re0" (simulating devd restarting dhclient on link-up) and it
reacquired a lease for the same IP it had before I killed it, and still
all my open connections are open.

It has worked this way for me for years.  Does it somehow not work this
way for everyone?

-- Ian





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1345562163.27688.347.camel>