I've got an embedded system running hostapd and dnsmasq acting as a wifi access point. Very repeatably it will take 11s between the time clients (Macbook pros, Dell laptops, iphones, android tablets) associate/authenticate with the AP and the time they get an IP address.
It appears that multipe dhcpdiscover/offers go through at nearly the same time, followed by a dhcprequest and dhcpack:
Apr 5 23:27:01 AP daemon.info hostapd: wlan0-ap: STA b8:e8:56:2d:45:ae IEEE 802.11: authenticated
Apr 5 23:27:01 AP daemon.info hostapd: wlan0-ap: STA b8:e8:56:2d:45:ae IEEE 802.11: associated (aid 2)
Apr 5 23:27:01 AP daemon.info hostapd: wlan0-ap: STA b8:e8:56:2d:45:ae RADIUS: starting accounting session 5521BC1F-00000007
Apr 5 23:27:01 AP daemon.info hostapd: wlan0-ap: STA b8:e8:56:2d:45:ae WPA: pairwise key handshake completed (RSN)
Apr 5 23:27:13 AP daemon.info dnsmasq-dhcp[734]: DHCPDISCOVER(wlan0-ap) b8:e8:56:2d:45:ae
Apr 5 23:27:13 AP daemon.info dnsmasq-dhcp[734]: DHCPOFFER(wlan0-ap) 10.1.1.166 b8:e8:56:2d:45:ae
Apr 5 23:27:13 AP daemon.info dnsmasq-dhcp[734]: DHCPDISCOVER(wlan0-ap) b8:e8:56:2d:45:ae
Apr 5 23:27:13 AP daemon.info dnsmasq-dhcp[734]: DHCPOFFER(wlan0-ap) 10.1.1.166 b8:e8:56:2d:45:ae
Apr 5 23:27:14 AP daemon.info dnsmasq-dhcp[734]: DHCPREQUEST(wlan0-ap) 10.1.1.166 b8:e8:56:2d:45:ae
Apr 5 23:27:14 AP daemon.info dnsmasq-dhcp[734]: DHCPACK(wlan0-ap) 10.1.1.166 b8:e8:56:2d:45:ae Allans-MBP
How can I speed up the time it takes to get an IP address on clients?
DHCPDISCOVER
message? Does it occur immediately upon successful association or about 10 seconds later as inferred from the enclosedhostapd
log? – Kenji