In this lesson, we will learn what DNS means, how it works and its functions in the world of internet. We will see how it helps us navigate the complicated web of domains and IP addresses we are constantly requesting through our web browser.
The DNS Makes Our Lives Easy
A drunk named John hops into a cab and says ”Geh me to the Gingername Club prizz”! The driver checks his GPS (directory), and looks through his list of saved destinations (cache) but can’t find a destination (IP address) with that name (host name). He has never been there before and John is too drunk to give him the address! So, he calls one of his pals, who works in the downtown area (domain server). His pal checks his own GPS (cache) and finds the address to the club (345 Peachtrump Pwy GF5TH7) as he has taken clients there in the past and saved the address (cached) on his own GPS. He then sends the address back to John’s cab driver and John is safely taken to his next club stop!
What is DNS?
DNS stands for Domain Name System. A domain is a unique string (Gingernameclub.
com) associated with an IP address. An IP address is a string of numbers used to identify a computer or resource on a network or internet. The Domain Name System (DNS) is a network of directories on the internet used to resolve host names (e.g. www.gingernameclub.com) into machine-readable IP addresses (e.
g. 192.168.106.81).Every computer, node, device or resource on the internet has a unique name and unique IP address.
There are millions of such devices or resources. Computers communicate on the internet using the machine-readable IP addresses. Imagine if we are to remember the IP addresses of all the pages we needed to visit or resources we needed to access. Browsing the internet would be anything but fun.Well, the DNS is what makes our lives so easy. It makes navigating this complex network of IP addresses user-friendly. It is the internet’s address book/directory.
It is the footman of our internet requests! The World Wide Web depends on the DNS to function as we know it today. Yes! DNS is that important!
So How Does DNS Work?
With the millions of nodes and resources on the internet their DNS information is not all kept in one place. The databases of DNS information are distributed worldwide.
It all starts with you!
User Requests Information
You are at your computer connected to the internet and type the URL to the club, www.gingernameclub.com, into your browser. You are actually requesting your browser to get you the web page of Gingername Club. Your browser cannot work with names but with IP addresses.
You are oblivious to the associated IP address. Your computer then checks its local DNS (John’s cab driver checks his personal GPS) to see whether it has cached information on this page before. Nope, your browser has never visited this page before. Therefore, your computer performs a DNS query (cab driver calls his pal).A DNS query is the process by which a computer or device on a network makes an inquiry to other devices to get the IP address for a DNS name.
In this case, we need the IP address of Gingernameclub.com.
Request Information from Recursive DNS Servers
If your computer fails to find the information in its local cache (saved query answers) it sends a DNS query to the servers hosted by your ISP (Internet Service Provider) through which you access the internet. These servers known as recursive servers may have the information cached. Recursive servers are servers which having their own cache, constantly refer back to themselves. If the recursive servers have the answer (IP address) then the information is sent back to your computer and the web page is displayed. IP address search is over.
Request Information from Root Servers
On the other hand, if the recursive servers cannot come up with the information, they then query root name servers. There are millions of web resources on the internet and each of these webpages or resources falls under 13 main categories. These categories are manned by a root name server. A root name server as the name implies are servers at the root or form the foundation of the DNS. They direct queries to the respective specific domains name servers. They are the top level domain traffic controllers.
Top level domain name category examples: .com, .org, .net
Root servers request information from TLD name servers
When the DNS query gets to the root name servers the server reads the DNS query from right to left.Our query: www.gingernameclub.
comThe root name servers read the .com part of the DNS query. It then locates the respective .com, Top Level Domain (TLD) name servers. Each domain name has its respective TLD name servers.
These servers do not have the complete information we need, but sent the request on the correct path to the servers with IP address information.
TDL Request Authoritative servers
The respective TDL name servers then examine the second part of the request:Our Request: www.gingernameclub.
com and submit this part of the request to the respective authoritative name server.The authoritative name servers hold all the specific information pertaining to that domain name. In our case, we are requesting the IP address to www.gingernameclub.
com. the authoritative server retrieves and releases this information.
The recursive server then retrieves this information. With the answer to the query finally obtained (in less than a second) the information is sent to your computer. Your computer now caches this information for future reference and your browser reads the IP address 192.168.
106.81 and presents you with the web page.
Domain Name System (DNS) is one of the fundamental components of the internet that makes it user-friendly. It is a distributed network of directories containing DNS information of all computers nodes and resources housed on the internet. A DNS query is the process by which a computer or device on a network makes an inquiry to other devices to get the IP address for a DNS name. If your computer or device fails to find the information in its saved query answers, it sends a DNS query to recursive servers, which are hosted by your ISP (Internet Service Provider).
However, if the recursive servers cannot locate the information, root name servers (servers that form the foundation of the DNS), will direct queries to top-level domain names, such as .com, .org, and .net.