The Domain Name System

The Domain Name System

In a web browser, when we need to find a website, the process is as simple as typing the name of the website to the search bar and hitting enter. You are then directed the specified website. While the process on a surface level looks straightforward, there is a surprising amount of work that actually goes into retrieving the page that you are looking for. Welcome to the topic of this article - The Domain Name System.

Introduction:

As humans, we understand alphabetical names over numbers. It is easier for us to remember. However, it is the opposite for computers, which communicate to one another using numbers called IP addresses. The domain name system helps to match the site name to the corresponding IP address, on a basic level.

The DNS Server:

The DNS server is a computer which contains the public IP addresses of the domain names. When a domain name is searched by a user, a request is sent to the DNS server in order to find the corresponding public IP to the domain name. The DNS can be distinguished from the DNS server, as DNS is a system which utilizes the DNS server in order to accomplish its tasks.

Types of DNS servers:

Within the domain name servers, there are different categories of servers, to increase the efficiency of the DNS lookup query.

The DNS Resolver:

This is the server that interact directly with the web browser and the rest of the DNS servers in respond to a query. It can be thought of as intermediary between the two.

When a web browser sends a DNS query, it either responds with cached memory of the domain name, or acts as the client by sending the request to the root name-server, followed by the TLD name-server and finally the authoritative name-server.

Once it receives a response from the authoritative name server with the IP address, it send the response back to the client.

During this process of retrieving the response from the IP address, it will cache the information gained in order to send it faster to the web browser the next time it is requested.

The Root Name-Server:

The second step to retrieving the IP address is via the root name-server.There are 13 root name-servers known to the all the DNS resolvers.

This server accepts the DNS revolver's request which includes the domain name, and responds by pointing to the TLD name-server which contains the respective extension of the domain name (.org,.com, .net, etc).The root nameservers are overseen by a nonprofit called the Internet Corporation for Assigned Names and Numbers (ICANN)

While there are 13 root name-servers, this does not mean to say that there are only 13 root name-servers in the DNS. There are 13 types of root name-servers, as well as multiple copies of each type of servers, in case of failure of one of the servers.

The TLD Name-Server:

These servers (Top Level Domain) name-servers, maintain information of all the domains that share a common extension (.com, .org, .net). For example, a .com TLD server will contain information of all the websites which have the extension .com.

When searching up the a specific website, the response of the root name-server to a query will contain the TLD name-server with the specific extension, whether it be .com, .org, .net ,etc.

The management of TLD is handled by Internet Assigned Numbers Authority (IANA), which is a branch of ICANN. Within the TLD, there are 2 types of servers:

  1. Generic top-level domains: Domains which are not country specific. eg: .com, .gov. .org

  2. Country code top-level domains: Domains specific to any country or state eg: .in, .uk, .us

The Authoritative Name-Server:

The Response the DNS resolver receives from the TLD server directs it to an Authoritative Name-Server. This is the last stop to acquiring the IP address of the domain name.

Authoritative name-servers contain information specific to the domain name it servers and can provide the IP address of the server to the DNS resolver. The DNS resolver will then provide the IP address to the web browser to access the destination server.

An overview of the entire process:

DNS .png

  1. Web browser send a DNS query to the DNS resolver
  2. DNS resolver in turn sends the DNS query to Root Name Server
  3. Root Name Server responds corresponding TLD server depending on extension
  4. DNS resolver send DNS query to TLD server
  5. TLD server responds with the information of an Authoritative Name Server of associated with the DNS query
  6. The DNS resolver then sends the DNS query to the Authoritative Name Server
  7. The Authoritative Name Server responds with the IP address of the respective domain name.
  8. The DNS resolver then provides the IP address to the web browser
  9. With the IP address provided, the web browser visits the server to request for information.
  10. The server responds by providing the requested information i.e the website