The first time the Android phone connects to the router WiFi speed is very fast, and the Apple phone connection speed is very slow, the main reason is two: 1. iOS system WiFi exists BUG;2.DHCP server assigned IP address time is too long.
By DNSMASQ Log Discovery, iOS first time connecting router WiFi time-consuming reason:
1. read the IP address cache in the machine, time consuming 1s(android not);
2. Send request message, the IP in the message is the last time the IP address of WiFi connection, if not the same network segment of the router, DNSMASQ directly send Nack message (set DNSMASQ configuration file, if not set, time consuming 2s);
3. Send Discover message, DNSMASQ respond to offer message, time consuming 3s(Android also);
4. Send request message, DNSMASQ response ACK message, time consuming 1s(android not);
5. Send ARP messages, the newly assigned IP is not occupied, time consuming 1-2s(android time consuming 1s).
From above you can see that iOS is connected to wifi more than Androd 3s.
The workaround is to modify the DNSMASQ configuration file dnmasq.conf:
1. Add dhcp-authoritative, corresponding to the above second, different network segment, DNSMASQ directly send Nack, can shorten the 2s;
2. Add no-ping, corresponding to the above third, the server before sending an offer message, the ICMP message will not be sent, can shorten the 3s;
Use the above configuration to make iOS first connection speed about 4s, two connections 2s or so
Use DNSMASQ as DHCP to resolve slow iOS connection routers