19.13. Troubleshooting DNS Clients
Problem
Configuring DNS involves a number of seemingly random configuration files on Linux. What do you need to look for to make sure client configurations are good?
Solution
DHCP clients on Debian need only entries in /etc/network/interfaces. Don't edit /etc/resolv.conf. You may enter important hosts in /etc/hosts as a fallback in case your DNS server goes down; just be careful to get it right because /etc/hosts takes precedence over your DNS server.
On Fedora, each interface has its own configuration file, /etc/sysconfig/network-scripts/ifcfg-*. Again, don't edit /etc/resolv.conf for DHCP clients, and you may use /etc/hosts as a fallback.
Statically configured interfaces must have nameservers configured in /etc/resolv.conf, and the correct gateway in the interface configuration file. You may use /etc/hosts as a fallback.
On Windows and Mac clients, the same principles apply: don't configure conflicting static information on DHCP clients, and on statically configured clients, make sure you manually configure the correct gateway and DNS servers. And, just like Linux DHCP clients, you can serve up everything from your DHCP server.
Discussion
Make it easy on yourself—use your DHCP server to assign dynamic and static addresses, provide addresses for your network gateway and servers, and assign static routes. Then, the only client configuration you need is the usual DHCP configuration.
See Also
Chapter 4 has several recipes on configuring DHCP and DNS with Dnsmasq ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access