r239356: does it mean, that synchronous dhcp and dhcplcinet
with disabled devd gone?
Ian Lepore
freebsd at damnhippie.dyndns.org
Tue Aug 21 15:16:12 UTC 2012
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
More information about the freebsd-current
mailing list