6 ms·
As 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 Cr
by bradknowles 5y ago
As 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.