dnsmasq/hostapd slow to offer DHCP address
Asked Answered
P

0

6

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?

Pender answered 5/4, 2015 at 23:48 Comment(1)
Have you tried sniffing the air interface? When do the clients actually send the DHCPDISCOVER message? Does it occur immediately upon successful association or about 10 seconds later as inferred from the enclosed hostapd log?Kenji

© 2022 - 2024 — McMap. All rights reserved.