DNS
DNS which stands for domain name system refers to a hierarchical decentralized naming system for computers, services or other resources connected to the internet or a private network. It translates more readily memorized domain names (www.example.com) to the numerical IP addresses (192.168.1.1) needed for locating and identifying computer services and devices with the underlying protocols. Without the DNS, the internet as we know it today would collapse and we would all be licking stamps to pay our bills.
HOW THE DOMAIN NAME SYSTEM (DNS) WORKS
In the web browser letās say you enter the URL, www.example.com as an example. When you type www.example.com into your address bar, you will actually be looking for
āwww.example.com.ā Yes there is a dot (.) at the end of the domain name. ,one that you never see and one that you never type. When you type in
āwww.example.com.ā, you are actually going to the page
www.example.com. That end dot (.) represents the root of the internetās name space, the
Root. Why is it so important? Because this is where it all begins.
When you first search forĀ
āwww.example.com.ā your browser and your operating system will first determine if they know what the IP address is already. It could be configured on your computer or it could be in memory called cache, so the browser asks the operating system and they both do not know where
āwww.example.com.ā is. What happens next?
The operating system is configured to ask a resolving name server for IP addresses it does not know. This resolving name service is the workhorse of the DNS lookup. It is either configured manually or automatically within your operating system.
Your operating system asks (queries) the resolving name server forĀ
āwww.example.com.ā The resolving name server may or may not have this in memory or cache. Letās assume it does not . The only thing all resolving name servers should know is where to find the root name servers.Ā That enigmatic dot that appears at the end of every domain name you type into that address bar.
The root name servers will reply with āI do not know, but I do know where to find the .com name servers. Try hereā. TheĀ com server called the Top Level Domain name server, puts it in its cache, and then goes directly to the COM TLD names server. When the resolving name server queriesĀ
āwww.example.com.ā , the TLD name server responds , I do not know , but I do know where to find example.com name servers. This next set of servers is the authoritative name servers. So how did the COM TLD name servers know which authoritative name servers to use? With the help of the domainās registrar. When a domain is purchased the registrar is told which authoritative name serversĀ that the domain should use. They notify the organization responsible for the top level domain (theĀ registry), and tell them to update the TLD name servers.
The resolving name server takes the response from the TLD name server, stores it in its cache, and then queries the
āwww.example.com.ā name servers. At this point, theĀ authoritative name server will say āhey;Ā I know where that is; tell your browser to go to the IP address 192.168.1.1. The resolving name server takes this information from the authoritative name server, puts it in its cache, and gives the reply to the operating system. The operating systemĀ then gives this to the browser and the browser then makes a connection to the IP address requesting the web page forĀ āwww.example.com
.ā and you will be able to access it on your computer.
The process seems complex but the whole cycle takes less time than it takes you to bl
ink an eye.
KEY NOTES;
- The resolving server
- The Root name server
- The TLD name server
- The Authoritative name servers
Please see the attached video for more elaborate explanation and also a document about DNS.
Resources;
- https://courses.cs.washington.edu/courses/cse484/07sp/lectures/Lecture12.pdf
- https://www.youtube.com/watch?v=mpQZVYPuDGU