Ubuntu – Android Not Resolving Internal DNS on Home Server

androiddhcpdnsUbuntu

I have a home network with a Ubuntu Server that handles all DNS and DHCP requests (I have disabled these services in my wireless router). My DHCP server (ISC-DHCP-Server) hands out IP addresses to our various devices based on reservations I have defined in the configuration. It also hands out the search domain, DNS server address, WINS server address, etc, to all clients. The DNS server (bind9) provides local DNS lookup, DNS caching and DNS forwarding (for internet addresses – forwards to Google DNS, 8.8.8.8).

This setup works great for most of my devices (Windows, MAC OSX, iOS) but does not work correctly with Android. When an Android device connects to the wireless network, it receives all of the correct IPs from DHCP. However, all DNS lookups fail. Nevertheless, I can still connect to websites using their IP addresses. All of the other devices are able to look up internal and external DNS records correctly.

This is the kicker. I can get Android to do lookups properly if I configure the network settings manually (in other words, setup a static IP and manually enter the DNS server on the Android client). However, when Android uses DHCP and receives the exact same values I enter manually, it is unable to do the lookups. I can work around this behavior by adding a secondary DNS server (8.8.8.8) to the DHCP configuration, but then the Android device only talks to the secondary server and is only able to resolve external, internet addresses but not internal, intranet addresses.

Any thoughts on what might be causing this?

Best Answer

It turns out it was a DHCP configuration on my end. I accidentally had the broadcast address set to the DHCP server IP instead of the last address (255) in the subnet. Changing this and restarting the DHCP service resolved the issue.

Related Question