3 ms·
TL;DR: ChromeOS uses this rfc, Android, dhcpcd, isc-dhcp-client doesn't (Note: I have no clue about systemd-networkd) Ok, so the article covers ARP discover, b
by phh 9y ago
TL;DR: ChromeOS uses this rfc, Android, dhcpcd, isc-dhcp-client doesn't
(Note: I have no clue about systemd-networkd)
Ok, so the article covers ARP discover, but actually it's not the only issue.
The author mentions a 10s timeout because his DHCP is not authoritative.
But in my opinion, that's not the real problem (though I admit it is better if his setup has it).
The author's device should not ask for an unrelated IP in the first place.
If it doesn't do so, and asks for the correct IP address, you save 1.5 RTT.
This is because at the time of that article, dhcpcd had one lease file per interface.
In my opinion, between RFC4436, and per-ssid interface, having a per-ssid lease makes a MUCH bigger user-facing change than RFC4436.
RFC4436 worst 1-percent gain is 1s, per-ssid lease worst 1-percent is gain 10s.
I suggested a fix to dhcpcd's author: have one lease file per { interface + ssid }.
This has been merged in dhcpcd in February 2015 (sorry, it looks like mailing-list archives is down).
So the bad feeling of > 10s connection time should be gone when using dhcpcd.
I've also suggested him to implement rfc4436, but got no answer at the time. Considering the friendly answer I had for my previous patch, I guess it just got lost.
As far as I can tell, as of today, mainline dhcpcd still doesn't implement it.
ChromeOS uses a patched dhcpcd, which includes RFC4436:
https://chromium-review.googlesource.com/c/22643/ https://chromium-review.googlesource.com/c/22643/
https://chromium-review.googlesource.com/c/23906/ https://chromium-review.googlesource.com/c/23906/
isc-dhcp-client, aka dhclient, doesn't seem to include either the ssid-based lease, or the RFC4436.
Android used to use dhcpcd until Android 6, but a very old version.
I published an updated version of dhcpcd for rooted Android:
https://forum.xda-developers.com/android/software/wifi-dhcp-accelerator-t3023534 https://forum.xda-developers.com/android/software/wifi-dhcp-...
I pushed to Android's gerrit the changes that were merged to dhcpcd (it had to be rewritten, because Android's dhcpcd is really old).
The result of this, is that for Android 6, Google decided to rewrite their own DHCP implementation (mostly because the integration with dhcpcd made a state machine more complex than rewriting a DHCP client).
This led to a java dhcp client which doesn't save leases, had flaws which could make an android device reboot, and which doesn't support RFC4436. At least, there is no longer any authoritative problem, since the device will always send a DISCOVER.
As far as I know, this still is the current status of Android.
Android Things, which is basically Android... Well, they are using yet another google-written dhcp client. ( https://android.googlesource.com/platform/system/connectivity/dhcp_client/ https://android.googlesource.com/platform/system/connectivit... )
This supports leases (I couldn't tell based on the sources whether it was interface or ssid-based), but no RFC4436.
- epistasis 9y agoFantastic, thanks for such a detailed response! My meager web searching skills did not turn up any of this. And of course, thanks for all this work, it's quite impressive.
- bobsam 9y agoAwesome work! Also, You not working for Google just proves their headhunting and recruitment process is not worth shit