[Dnsmasq-discuss] dnsmasq doesn't provide IP address to udhcpc?
Tom.Isaacson at navico.com
Tue Nov 26 10:45:51 GMT 2013
We have an embedded Linux device using udhcpc to get a DHCP IP address and a Wifi access point that provides it. Originally the WAP used udhcpc as well and this worked fine, but in order to add DNS support we replaced udhcpc with dnsmasq. This works fine when I connect a laptop running Windows 7 - I see Discover, Offer, Request, ACK and Inform in Wireshark. But on the Linux device I never get a DHCP address.
If I run `dnsmasq -d` on the WAP I get this result:
dnsmasq: started, version 2.52 cachesize 150
dnsmasq: compile time options: no-IPv6 GNU-getopt no-MMU no-DBus no-I18N DHCP no-TFTP
dnsmasq-dhcp: DHCP, IP range 192.168.0.10 -- 192.168.0.254, lease time 1d
dnsmasq: failed to access /etc/resolv.conf: No such file or directory
dnsmasq: read /etc/hosts - 2 addresses
dnsmasq-dhcp: DHCPDISCOVER(br0) 00:0e:91:08:1e:1c
dnsmasq-dhcp: DHCPOFFER(br0) 192.168.0.45 00:0e:91:08:1e:1c
which is the MAC address of the embedded Linux device. But on Wireshark I'm only seeing Discover - the DHCPOFFER doesn't appear.
I can only see one difference between the Discover from Windows 7 and udhcpc - from Windows 7 the Bootp flags are set to 0x8000 (Broadcast) whereas from udhcpc they're set to 0x0000 (Unicast). I searched around and found this post:
Since "dhcp-broadcast" is now a feature of dnsmasq.conf I tried adding:
but this didn't make any difference. I then tried:
and this appears to work (although I've only had time to test it once).
Can anyone explain what the problem is and what I've done to fix it? Why does #bootp work and not bootp? I'm nervous of any fix I don't understand!
I also put this question on StackOverflow if anyone's looking for some points:
More information about the Dnsmasq-discuss