How the Domain Name System Works
Understand the detailed working of the domain name system.
Through this lesson, we’ll answer the following questions:
- How is the DNS hierarchy formed using various types of DNS name servers?
- How is caching performed at different levels of the Internet to reduce the querying burden over the DNS infrastructure?
- How does the distributed nature of the DNS infrastructure help its robustness?
Let’s get started.
DNS hierarchy
As stated before, the DNS isn’t a single server that accepts requests and responds to user queries. It’s a complete infrastructure with
There are mainly four types of servers in the DNS hierarchy:
- DNS resolver: Resolvers initiate the querying sequence and forward requests to the other DNS name servers. Typically, DNS resolvers lie within the premise of the user’s network. However, DNS resolvers can also cater to users’ DNS queries through caching techniques, as we will see shortly. These servers can also be called local or default servers.
- Root-level name servers: These servers receive requests from local servers. Root name servers maintain name servers based on top-level domain names, such as
.com
,.edu
,.us
, and so on. For instance, when a user requests the IP address of educative.io, root-level name servers will return a list of top-level domain (TLD) servers that hold the IP addresses of the.io
domain. - Top-level domain (TLD) name servers: These servers hold the IP addresses of authoritative name servers. The querying party will get a list of IP addresses that belong to the authoritative servers of the organization.
- Authoritative name servers: These are the organization’s DNS name servers that provide the IP addresses of the web or application servers.
Point to Ponder
1.
How are DNS names processed? For example, will educative.io be processed from left to right or right to left?
Show Answer
Q1 / Q1
Did you find this helpful?
Iterative versus recursive query resolution
There are two ways to perform a DNS query:
- Iterative: The local server requests the root, TLD, and the authoritative servers for the IP address.
- Recursive: The end user requests the local server. The local server further requests the root DNS name servers. The root name servers forward the requests to other name servers.
In the following illustration (on the ...