Internet is a computer network consisting of all the computers in the world which are interconnected to each other by way of certain protocols. All devices on a network have IP addresses assigned to them by way of which they are able to communicate with other devices on the network. That is the only way, i.e. IP addresses, by which computers are able to interact with each other. But since it would be difficult for humans to IP addresses of websites which is made up of numbers, there are Domain Names which correspond to IP-Addresses (e.g. an IP address of www.google.com is 22.214.171.124). This mapping is always working seamlessly in the background through something called Domain Name System (DNS) which helps computers convert human readable domain names to IP addresses.
DNS may be compared to the phone-book of the internet. It bridges the gap between human readable domain names to computer-understandable IP addresses. So whenever a user requests for a website ,e.g. www.google.com, the user’s computer sends a request to the DNS server which has been configured in the user’s computer either automatically by the user’s Internet Service Provider or manually by the user. This request contains the name of the website that the user wants to open (i.e. www.google.com). Now, the DNS server will revert back to the user’s computer with the IP address of the required website and the user’s web browser will open the same for user to work upon.
How DNS works?
The exact steps in which a DNS query works are as follows:
- The user’s computer search for corresponding record in the local cache of the computer, i.e. locally stored records of previously done DNS queries. If a record is found there, it is used.
- If the record is not found in the local cache, a query is sent to what is called a Recursive DNS Server/Resolver which is generally provided by your Internet Service Provider. If a record is found there, it is used.
- If a record is not found in the Recursive DNS Server/Resolver, a query is sent by the Recursive DNS Server/Resolver to a Root Name Server. If the Root Name Server has the required record, it is sent back to the Recursive DNS Server/Resolver which sends it back to the user’s computer.
- If a record is not found in the Root Name Server, they Root Name Server directs the Recursive DNS Server/Resolver to ask the query to a specified Top Level Domain (TLD) Name Server. If the TLD Name Server has the required record, it is sent back to the Recursive DNS Server/Resolver which sends it back to the user’s computer.
- If a record is not found in the TLD Name Server, they TLD Name Server directs the Recursive DNS Server/Resolver to ask the query to a specified Authoritative DNS Server. If the Authoritative Name Server has the required record, it sends the required record back to the Recursive DNS Server/Resolver which sends it to the user’s computer. Then the website with the specified domain is opened using the obtained IP address.
- If no record is found, then the user is trying to open a non-existing domain.
Here, in case the Recursive DNS Server/Resolver did not have the required record with itself in the first instance, it saves the retrieved record from the TLD Name Server or the Authoritative DNS Server for future use.
For Wikipedia entry on DNS, click here.
For Wikipedia entry on Internet, click here.
For more posts on Internet, click here.
For more posts in The Cyber Cops project, click here.