I read the following response on reddit in response to a question: "What are some problems at work you recently solved?"

Hosts are in database, now there are hosts in /var/named. I mean, there were hosts in /var/named, but it was awful to manage because the admin before me didn't know how to architect (people would write text files that would become diffs which would be shuffled around from machine to machine). Soon there will be hosts in /etc/dhcpd-something.

Now I'm trying to figure out what this person is talking about. I'm wondering what does /var/named mean in this context? Is it a directory? A config file?

from reading on tldp I can see that named is a program that provides "DNS on most UNIX machines". And it's config file is in /etc/named.conf.

When I started reading about named I started thinking about the /etc/hosts file and thought they might be conceptually related in some way.

Would love some guidance in unpacking the above quote :)

closed as too broad by Rui F Ribeiro, roaima, Anthon, Eric Renouf, GAD3R Sep 21 '16 at 19:49

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Please google around, BIND and /etc/hosts; also the o´reilly book BIND 9 from Cricket Liu. – Rui F Ribeiro Sep 21 '16 at 14:15

Hosts mappings between IP address and name can be defined in /etc/hosts. This is similar to the original (D)ARPAnet. However, when you have more than a very few hosts it's administratively awkward to keep all the /etc/hosts files synchronised and uptodate.

Thus the Domain Name System or DNS was born, which provides a distributed mechanism for mapping between hosts' IP addresses and names. One particular implementation is BIND, which runs a service called named. Inevitably, the location of the configuration files for named is /var/named.

The big advantage of DNS over /etc/hosts is that you can have one or two local DNS servers for an entire local network. And those can be kept synchronised by a subsection of the DNS protocol. No more keeping /etc/hosts files synchronised. In fact, no editing of /etc/hosts at all. Furthermore, there ceases to be any difference in the way a host name or address is looked up for a local network host or one managed by another organisation is some unknown location the other side of the world. That's a benefit of a distributed solution.

If your administrator is copying files between /var/named directories then either they haven't grasped the distributed network nature of DNS or you've misunderstood what they're doing.

As for DHCP, there can be hosts in the DHCP configuration file but typically this would be used only for diskless clients that require support via the BOOTP protocol to boot from a network image. Software such as dnsmasq can manage DNS, DHCP and BOOTP all from the single configuration file, but it doesn't handle synchronisation between multiple servers.

Not the answer you're looking for? Browse other questions tagged or ask your own question.