4

Every example dhcp.conf I can find has hard coded DNS servers - typically the google public DNS addresses...

option domain-name-servers 8.8.8.8, 8.8.4.4;

If I leave out the option domain-name-servers, then clients get no DNS server at all.

I figure I could set up a forwarding DNS server on the same box that is running the DHCP server, but it seems like unnecessary complexity and latency. I'd much rather have the DHCP clients go directly to whatever DNS server the box already has configured (typically from an upstream DHCP server).

Is there any way to configure isc-dhcp-server to offer the host's current DNS servers to DHCP clients?

  • 1
    Without some code interface offered by ISC, you'd probably need to template the dhcpd.conf and replace them manually, then restart dhcpd. – thrig Mar 23 '16 at 18:23
  • I figured, but this just seams like such a universal use-case that there had to be a good way to get there. Can it really be that all of these nat-ing routers are passing the buck to hard coded google servers, regardless of where the routers might be geographically or topologically located? – bigjosh Mar 23 '16 at 18:27
  • The ISC DHCPD design predates the rise of NAT and servers themselves being on DHCP for some other network. I would suspect nat-ing routers are instead using dnsmasq or other not-isc-dhcpd implementations. – thrig Mar 23 '16 at 18:59
  • Having a local caching DNS resolver is worth the (very small) effort it takes to install and configure it. it can shave off half-a-second or more from connections if multiple users are accessing the same hosts....BTW web browsers often have their own DNS caches, but command-line tools like ssh or telnet or ping don't, and will do a DNS lookup on each request. a local cache will resolve that almost instantly, while asking google's DNS (or your ISP's or whatever) can take 10s or 100s of milliseconds. – cas Mar 24 '16 at 3:20

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.