What is DNS Server and How it Works

What is DNS Server and How it Works

May 5, 2020 Off By kentavenue

The DNS, or the Domain Name System, has been helping humans navigate the Internet since the 1970s. Back then, the Stanford Research institute used a hosts.txt file to map the hostnames to the computers on the ARPANET network.

DNS acts as a translator between people and computers. It maintains a table where IP addresses are mapped to words. If the DNS system didn’t exist, we would have to memorize every IP address that we would like to visit. 

 

HOW THE DNS WORKS? 

While many don’t know the details of how the Internet works, most of us are aware that all computers are connected to networks. Computers on those networks are identified by IP addresses.

 

For instance:  

172.16.254.1 could be the IP address of a computer located in Germany. If this is your home computer’s static IP address, and if you have a good memory, you can access your computer from anywhere in the world. 

 

In the above scenario, you only needed to remember one IP address, but imagine if you had to remember all the IP addresses of every website that you visit every day. The DNS has been developed, so it is easier for humans to navigate the internet. 

 

Let’s take a look at the following example: 

You want to access the address www.example.com

 

When you type in the address in the browser, the computer first looks up in its cache to see if the address is already known. The local DNS cache is a temporary database that records every DNS lookup that has been made by the computer. 

 

If the www.example.com is not found in the local DNS cache, the computer will move forward, and it will query the Resolving Name Server. The Resolving Name Server is provided by your internet service provider (ISP). It first checks its own cache to see if the addresses are already known. 

 

If the address is not in the DNS cache of the ISP, the internet service provider connects to the root name servers. 

Root name servers are the first step in the translation of the human-readable addresses into IP addresses. They are managed by 12 organizations. There are 13 sets of logical root name servers placed around the World. Every server has an informational page that can be accessed by anyone at letter.root-servers.org where the letter should be replaced by letters ranging from a to m. Another information page about the root servers exists at www.root-servers.org 

The only exception in the above scheme is the address for the g-server. The information about it can be accessed at the following address: https://disa.mil/g-root

 

The next step, after the DNS request reaches the root servers, is to check the extension of the address in the query. Based on the extension (.com or .net, etc), the root name server provides the IP address of the top-level domain server (TLD) to the DNS resolver. 

The top-level domain names share common domain extensions, like .com, .net, .edu, and so on. 

 

The TLD name server checks the address and extension, connects to its appropriate .com or .net server, and provides the IP address of the authoritative name server (ANS). The authoritative name servers (ANS) stores the actual IP address of the websites. 

 

It tries to find the example in www.example.com. Once found, the ANS server provides the IP address to the DNS resolver. 

After receiving the IP address, the ISP DNS resolver stores this IP address in its cache for future use. After this, it provides the IP address to your computer. 

 

It all happens very quickly and most of the time we, as users, don’t even think about what happens beneath the surface when we type an address in the address bar. 

 

HOW DOES THE TLD KNOWS WHICH ANS IS STORING THE IP ADDRESS? 

When you buy a domain name and a hosting, you provide the Authoritative name server details to the Registrar. The registrar, for instance, GoDaddy, NameCheap, or HostGator, then tells the TLD to update the Registry with the ANS information the user has provided. 

 

REGISTRY vs. REGISTRAR vs. REGISTRANT

   • The Registry is an organization that manages the top-level domain names. They work with the registrars to sell the domain name to the public. An example of such a company is VeriSign that manages the .com domain names and their domain name system.  

   • Registrar is an accredited organization that sells domain names. Popular registrars are GoDaddy, NameCheap, HostGator, etc. 

   • The Registrant is the person or organization that buys the domain name.  

 

DO YOU NEED TO USE THE DNS? 

DNS is not necessary when you know the exact IP address you want to access. If you already know the IP address of the website, there is no need to use the DNS. You can just type the address of the website in the address bar of your browser. DNS is a convenient way of using the internet with its millions of addresses.