All DNS servers fall into one of four categories: Recursive resolvers, root nameservers, TLD nameservers, and authoritative nameservers.
Recursive resolver / DNS resolver
- First stop in a DNS query
- It either respond with cached data, or send a request to a root nameserver, followed by another request to a TLD nameserver, and then one last request to an authoritative nameserver.
- After receiving a response from the authoritative nameserver with the requested IP address, the recursive resolver then sends a response to the client.
- It will cache information received from authoritative name servers.
- Most internet users use a recursive resolver provided by their ISP.
DNS Root Server
- Accepts a domain name and responds by directing the recursive resolver to a TLD nameserver, based on the extension of that domain (.com, .net, .org, etc.).
- 13 type root nameserver from ICANN. multiple copies of each one all over the world (632 in 2016)
- Maintains information for all the domain names that share a common domain extension.
- Respond by pointing to the authoritative nameserver
- Management of TLD nameservers is handled by IANA, which breaks up the TLD servers into two main groups
- Generic top-level domains: not country specific (.com, .org, .net, .edu, and .gov.)
- Country code top-level domains: domains that are specific to a country or state (.uk, .us, .ru, and .jp)
- Provide a recursive resolver with the IP address of that server found in the DNS A record
- If the domain has a CNAME record (alias) it will provide the recursive resolver with an alias domain, which point the recursive resolver will have to perform a whole new DNS lookup