
Rapid DHCP: Or, how do Macs get on the network so fast?	(2011) - allenleein
https://cafbit.com/post/rapid_dhcp_or_how_do/
======
epistasis
This is an article from 2011, 6 years ago. Has there been any progress on
implementing RFC 4436 on Linux in general or Android specifically in the
interim?

[http://www.ietf.org/rfc/rfc4436.txt](http://www.ietf.org/rfc/rfc4436.txt)

~~~
bobsam
No, but it is still quite fast.

On chromeOS network bring up is _extremely_ fast. We are talking 1-3 seconds
from cold boot to your emails have been synchronized.

My Ubuntu is almost as fast, if we subtract the 4 seconds the ugly bios screen
adds.

No idea about Android, but did you read the end of the article?

~~~
finnn
Are you saying that 1-3 seconds includes boot time? Like, time form pressing
the power button to email syncing?

~~~
bobsam
Edit: yes, but it depends very much on hardware. My old arm chromebook was
very fast to boot but the Intel ones seem to boot slower:

[https://youtu.be/rsTyiMTYq9M](https://youtu.be/rsTyiMTYq9M)

------
lathiat
Interesting nugget of information here: > Thanks to Steinar H. Gunderson for
pointing out in the comments that the DHCP server on my test network was
incorrectly configured. Since I was using a mostly "out of the box" dhcpd
configuration from Ubunbtu Linux, it wasn't set up to be authoritative by
default, so it wasn't promptly sending NAKs in response to the Galaxy Tab's
requests for an old IP address. After fixing the problem on the DHCP server,
the Galaxy Tab's DHCP handshake happens quite a bit faster (although still 85
times slower than the Mac).

Set authoritative on your dhcpd.conf! I checked, fortunately mine is set :)

~~~
taurath
An instruction like that is why I don't use Linux as a desktop!

~~~
Nition
I'm a bit disappointed that you're downvoted to grey right now because editing
obscure config files and entering esoteric terminal commands is exactly why
Linux is so difficult for the average user, and it's never going to improve if
those who're already comfortable with it ignore the problem.

~~~
RubyPinch
That's all fine and dandy for the desktop case.

But its a dhcp _server_ , network admins would be expected to touch config
files, and the interface for a DHCP server really can't be much worse than the
GUI version that microsoft supplies!

but digressions, to say "this is why I won't use a linux desktop" in response
to a server-specific use-case, is at best antagonistic!

~~~
d-sc
The used netgear router a friend gave me, does a fine job of getting my
devices ip addresses on time without me touching the config.

~~~
djmobley
In fairness, it is a sensible default for a dedicated hardware router, and not
so much for a software DHCP server.

------
colanderman
This is nice, but kind of useless when waking up from deeper sleep states,
which prevent the password dialog from receiving keystrokes for a good five
seconds anyway (despite teasing a blinking cursor).

~~~
smcl
That blinking cursor is especially sneaky. When they just loaded up what is
effectively a screenshot while everything loaded, that could've been forgiven
(better than a blank screen I suppose). But animating it so that it LOOKS like
it's working ...

~~~
hibbelig
Thank you both. I've been mystified by this behavior for years. How do I tell
when it becomes responsive ? Without trying to type of course.

------
kalleboo
I remember this feature used to cause a lot of problems with random IP
conflicts, but I haven't had an IP conflict like that in years, so it seems
they've made it a lot more robust. Or are routers/DHCP servers just less
broken these days (I guess since Apple's market share has forced them to)?

~~~
3pt14159
It still happens. I run Ubuntu on a MBP (dual boot) and some networks are
fucking great. No problems whatsoever. Others I get booted off more frequently
the more people enter the cafe. I dug into the problem a while back and
figured out it was this shitty behaviour by Apple that Ubuntu hadn't fixed.

~~~
djrogers
It’s not a Mac hardware behavior, it’s in macOS - the fact that you’re seeing
bad things in Ubuntu has nothing to do with Apple here.

------
mschuster91
The joke is, Macbooks are dead slow on WPA2-Enterprise networks once you go
with certificate-based logins. At home, I'm in the network often enough faster
than 1s - at work, up to two minutes sometimes.

I guess that modern macbooks keep the connection alive on the PHY level while
asleep... they do have that "backup/sync while you sleep" feature, so quite
possible that the chip handling this feature only speaks "normal" WPA2, keeps
the connection alive and then after resuming the OS only has to re-check the
IP address and does not have to do the full PHY handshake first...

~~~
djrogers
If you’re seeing 2 minute connection times that’s on your network - probably
the RADIUS server, not macOS. There are tons of places using macs with WPA2
and certs that don’t have any connection lag - including my employer and many
of my customers.

------
johngalt
Rapid driving: how ignoring red lights makes the iCar so fast.

~~~
rkangel
Except that this isn't ignoring red lights, it's taking a government approved
shortcut that no-one else has done the research to know about (to extend your
metaphor). This approach is standards approved:

[http://www.ietf.org/rfc/rfc4436.txt](http://www.ietf.org/rfc/rfc4436.txt)

~~~
mjw1007
Still PROPOSED STANDARD, eleven years on. Though that says as much about the
IETF as that particular RFC.

~~~
TD-Linux
That's just IETF terminology. Number assignment is one of the last things to
happen - so if it has a number, it's done.

------
mappu
Previous comments are interesting:
[https://news.ycombinator.com/item?id=2755461](https://news.ycombinator.com/item?id=2755461)

------
cordite
They also end up with other host names in the terminal from time to time.

~~~
panic
The hostname has to do with multicast DNS / "Bonjour", not DHCP or IP address
assignment.

------
tiku
I'm more worried about the network problems i have with my mac, it disconnects
sometimes out of the blue, if i reconnect or enable/disable vpn it works
again, very weird behaviour.

------
VeejayRampay
Honestly, my Lenovo using Ubuntu gets on the network just as fast as my Mac
used to, it's impressive coming back to Linux after 5 years.

------
sethammons
> I assume the Mac would know to begin the DHCP discovery phase, instead of
> sending blind requests for a former IP address...

I wonder if that is my problem. Often, my Mac won't connect to my mobile
hotspot. I open the lid, it starts attempting to connect to the hotspot and
just sits. Connecting. Forever. I can turn off WiFi, turn off the hotspot, and
sometimes even reboot both my phone and my laptop and still be unable to
connect.

I recently figured out that if this not-connecting happens, I can disable
wifi, disable hotspot, turn on WiFi and select my not-on hotspot to connect
to. A couple of seconds later, it fails and asks to run network diagnostics. I
cancel, disable wifi, turn back on the hotspot, turn back on wifi and, presto,
it connects.

I figured there was some caching going on and that I am effectively
invalidating the cache. Maybe this is what the op is talking about here.

~~~
djrogers
It sounds more like your hotspot is janky - if a Mac doesn’t get a DHCP
response it will still connect to the wifi network using and autoconf address.
There is no dhcp related scenario that causes it to not connect to the network
at all.

------
aeontech
Pretty neat!

Previously discussed here:
[https://news.ycombinator.com/item?id=2755461](https://news.ycombinator.com/item?id=2755461)

------
ksk
Interestingly, we use Cisco's Meraki APs at work. The WiFi is pretty solid
most of the time, but macs are the only machines that suffer occasional
dropouts and then DHCP stops working till you cycle the n/w adapter. (though
iphones never seem to have this issue).

------
oxplot
It depends on the router too. My arch Linux connects almost instantly to my
Ubiquiti WiFi AP on wake from sleep, but takes seconds to connect to my phone
AP.

------
paule89
Can someone please port this to the linux kernel, or at least archlinux /
ubuntu????

------
Gys
Does anybody know if there is a setting to disable this ?

------
PhasmaFelis
My 5-year-old MBP doesn't seem to connect faster than anything else.

------
the_duke
Needs a (2011) in the title.

------
ams6110
Could have been titled: How do Apple devices wreak havoc on home networks.

When my kid comes home with his iPhone there is a better than even chance that
my home network will go out to lunch. Router reboot time.

Never happens with Windows or Android devices coming and going.

~~~
mdekkers
My SO unfortunately has 2 ipones, an ipad and a MBP. There is a confluence of
DHCP activity from all these devices that is guaranteed to take my network
down.

~~~
acdha
Unless your DHCP server is an old Commodore 64, that's not the right
diagnosis. The ISC DHCP server was rock solid with negligible CPU load with
many thousands of clients even 10-15 years ago.

If your network is really having problems, either dig deeper if you want to
learn more about networking or buy something like a Google WiFi device if you
just want something known to handle much greater loads without issue.

~~~
mdekkers
It will kill my fiber to the home network box that my telco installed, and
provides DHCP. It isn't a load issue, it is a "the DHCP server died" issue.

~~~
acdha
That's a bug in that software stack which is unique to however they've
designed it. The right thing to do is fix it or replace it rather than blaming
the vendor you notice problems with, just as you wouldn't blame a pothole on
the first car to hit it.

