I am creating a Wifi hotspot with hostapd and providing DHCP/DNS through dnsmasq on an Android 5.0.1 device. When a client connects to the Wifi hotspot it is subsequently unable to obtain an IP address through DHCP. The dnsmasq server claims to send a DHCP ACK response but no packet is seen in wireshark.

dnsmasq is started with the following options (formatted for viewing).

--dhcp-range=2001::2, 2001::10, ra-stateless,infinite

The dnsmasq logs show that dnsmasq receives the DHCP REQUEST from the client and attempts to respond with DHCP ACK.

I/dnsmasq (10989): started, version 2.62 cachesize 150
I/dnsmasq (10989): compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-scripts no-TFTP no-conntrack
W/dnsmasq (10989): warning: no upstream servers configured
I/dnsmasq (10989): IPv6 router advertisement enabled
I/dnsmasq (10989): DHCP, IP range --, lease time 1h
I/dnsmasq (10989): DHCP, IP range --, lease time 1h
I/dnsmasq (10989): DHCP, IP range --, lease time 1h
I/dnsmasq (10989): DHCP, IP range --, lease time 1h
I/dnsmasq (10989): DHCP, IP range --, lease time 1h
I/dnsmasq (10989): DHCP, IP range --, lease time 1h
I/dnsmasq (10989): DHCP, IP range --, lease time 1h
I/dnsmasq (10989): DHCP, IP range --, lease time 1h
I/dnsmasq (10989): stateless DHCPv6 on 2001::2
I/dnsmasq (10989): SLAAC on 2001:: prefix valid infinite
I/dnsmasq (10989): read /etc/hosts - 1 addresses
I/dnsmasq (10989): using nameserver
I/dnsmasq (10989): update ra:true|wlan0|rmnet0|97
I/dnsmasq (10989): internal inf is wlan0
I/dnsmasq (10989): external inf is rmnet0
I/dnsmasq (10989): set table number:97
I/dnsmasq (10989): update_ra count:0
I/dnsmasq (10989): link local address:wlan0
I/dnsmasq (10989): failed to send_ra: face_enumerate, parm.found_context
I/dnsmasq (10989): failed to update ra:send_ra
I/dnsmasq (10989): DHCPDISCOVER(wlan0) c0:bd:d1:4a:3a:0f 
I/dnsmasq (10989): DHCPOFFER(wlan0) c0:bd:d1:4a:3a:0f 
I/dnsmasq (10989): DHCPREQUEST(wlan0) c0:bd:d1:4a:3a:0f 
I/dnsmasq (10989): DHCPACK(wlan0) c0:bd:d1:4a:3a:0f android-e55b7f59c0dfe96

Wireshark shows the reception of the DHCP REQUEST packet from the client but no DHCP ACK is ever sent. Instead, the host is issuing ARP requests for the offered IP address.

enter image description here

I cannot understand why the host is sending ARP requests for the offered IP address instead of sending the DHCP ACK. Can anyone help me understand what I am seeing and how it can be fixed? Thanks.


The wifi hotspot was created by monitoring all commands sent to the netd socket during standard wifi hotspot creation through Android and replaying those commands with /system/bin/ndc.

ndc netd softap fwreload wlan0 AP
ndc netd softap set wlan0 Redskins wpa2-psk DanSnyderSucks
ndc netd softap startap
ndc netd interface getcfg wlan0
ndc netd interface setcfg wlan0 24 up multicast running broadcast
ndc netd tether interface add wlan0
ndc netd interface getcfg wlan0
ndc netd network interface add local wlan0
ndc netd network route add local wlan0
ndc netd ipfwd enable
ndc netd tether start
ndc netd tether dns set 501
ndc netd nat enable wlan0 rmnet0 1
ndc netd tether ra true wlan0 rmnet0


Any suggestions or ideas on where to even begin debugging would be greatly appreciated. I have tried comparing logcat logs and kmsg logs but I have been unable to exact any useful information.

  • Could you mention the command(s) you used to create the hotspot? – Firelord Aug 7 '15 at 3:42
  • I logged all messages over the netd socket during WiFi hotspot creation through the standard Android menu and replayed them later using /system/bin/ndc. See the main edit for the list of commands. – bangelo Aug 7 '15 at 15:45
  • H Sir, i encountered the same issue as yours. did you solved it? could you share your light on this issue? my dnsmasque log indicate that it already sent DHCP offer packet, but in the tcpdump i just found the DHCP discovery packet, not have DHCP offer packet. is it linux network module drop it? appreciated that you can give some suggestion. thansk & Regards, xiangyun – user269379 Jul 22 '18 at 3:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.