3 ms·
The multiple meanings of “nameserver” and “DNS resolver”
- egberts1 5y agoas one who is NOT affiliated with ISC Bind named program but actually read a lot on DNS and wrote user configuration front-end providing closed-net DNSSEC, hidden master, bastion, split-horizon, and private root server settings to named.conf and its zone (text-based) database files, my take of the definition of nameserver and DNS resolver is this: nameserver is a term used by DHCP and host resolver to be the server that provides a fully resolved (one that did all the resolving or asked others to do some resolving) upon receiving a DNS request before sending the final answer to the requestor (often the host via resolver library (as often guided by /etc/resolve.conf). The nameserver can be a forwarder and by its stated function not have a recursive mechanism. Nameserver is more about the first step for a host to obtain an answer to its query. DNS resolver is not the common term to use but refers to a generic DNS server configured to do a partial or full recursive (depending on whether they also have some primary zone(s) locally) with a goal to contact an authoritative server for each zone (parts of the domain name separated by a period). A DNS resolver would not necessarily be the first server that a host would request. Of course, caching might provide one of its zone answer sooner, if enabled and encountered an answer previously within its expiration period. Any error, typos, mistakes are mine and mine alone. This is my off-the-cuff answer.
- bradknowles 5y agoAs someone who has been involved in DNS and BIND in one capacity or another since about 1991 (and a technical reviewer of The O’Reilly book “DNS and BIND” by Cricket Liu and Paul Albitz), I have a much simpler definition in mind. A nameserver is a piece of software that runs independently in the background (as a “daemon”) on a host or VM, and answers queries from resolvers or other name servers, possibly locally on the machine, or locally to the current private subnet, or publicly, or some combination there of. It might run in caching-only mode, it might run in authoritative mode, or it might (inadvisedly) run in both caching and authoritative mode. Unless running in authoritative-only mode, to be a nameserver means that you must support recursion. If you are not running in authoritative mode, and you do not support recursion, then you are not a nameserver. A resolver is a bit of library code that other code might call, but does not run independently. Moreover, resolvers are generally less capable than nameservers, and might even be single-threaded. Their only real purpose is to take the simple queries that they get from clients to the library, and to turn those into real DNS queries that can be addressed to a nameserver, usually a caching nameserver because resolvers aren’t generally that bright, and they can’t do their own recursion. But a nameserver can do recursion, if it is not running in authoritative-only mode. The program “nsd” is an authoritative-only nameserver, see https://en.wikipedia.org/wiki/NSD https://en.wikipedia.org/wiki/NSD In contrast, “unbound” is a caching-only recursive nameserver, see https://en.wikipedia.org/wiki/Unbound_(DNS_server) https://en.wikipedia.org/wiki/Unbound_(DNS_server) Both programs were developed under the auspices of NLNet. For examples of a DNS resolver, the first obvious stop is whatever version of libc that you have installed, and the gethostby* library calls. That’s the way I see it.
- egberts1 5y agoThanks, I needed that most authoritative input. While I may have missed several marks in my other comment, I’d like to think we converged on the fact that nameserver is that first and largely the only step for a host to ask about a DNS record (hosts file not withstanding). I am with you on your definition of resolver, but it would appear to me that DNS resolver is a subset of resolver (as in apart from host-based resolver). I merely went by what many functional aspects that DNS documentations over the year are trying to convey.
- timando 5y agoHow would you classify dnsmasq?
- bradknowles 5y agoAs a caching-only recursive nameserver.
- teh_klev 5y agoThank you Brad, a former tech who a long time ago managed a previous employer's (ISP) DNS infrastructure for about 16 years (BIND and djbDNS [yes]), thank you for this post. Trying to explain these points to other staff members over, and over, and over, and over has been a complete ball-ache in my life.