What is DNS?
Domain Name Systems also commonly referred to as DNS. What is it? How does it work? Why should you care?
Series: What is DNS?
- What is DNS?
What's your name? Wait.. don't tell me. You're a human aren't you? In the world of networking, computers don't go by names like us humans do, they go by numbers. Why? Because that's how computers communicate to one another, it's their language just as how we humans communicate in our respective languages.
How do they communicate?
- Computers communicate using something called IP addresses which looks like this e.g. 192.168.0.23
- For humans and computers to be able to communicate we need to use a common language; to bridge the gap... DNS was born
How it works?
Domain Name Systems aka DNS for short resolves domain names to IP addresses.
Let's breakdown how it works. Take a look at the image below:
Step 0 - Browser
When you type a url into the browser e.g. domain.com. You are basically asking the DNS resolver (think of this as your ISP), "hey do you know where I can find the IP address of domain.com?" Your browser sends requests to the DNS resolver asking it to provide information related to domain.com.
Step 1 - DNS resolver
The DNS resolver checks it's cache, think of the DNS resolver as a phonebook. In a phonebook you don't just start searching using numbers instead you do this using names to locate the numbers. The DNS resolver is the same, it checks for existing entry in it's cache if the entry doesn't exist it then inquires of the Root Server. "hey Root Server do you know where I can find the IP address of domain.com? Cause I have no idea"
Step 2 - Root Server
The Root Server starts your journey to getting to your webpage. There are 13 unique Root Servers stratigically placed around the world managed by 12 different organizations. The Root Server will forward the request to the Top Level Domain (TLD) Server. "hey TLD Server do you know where I can find the IP address of domain.com? I know you manage .com domains so you must know"
Step 3 - TLD Server
The Top Level Domain (TLD) Server is reponsible for storing all information for TLD e.g. .com, .co.za, .org etc.. But it won't know the IP address of domain.com instead it will direct the request to the Auth Server
Step 4 - Auth Server
The Auth (Authoritative) Server is the last stop of the DNS lookup. It is responsible for knowing everything about the domain which includes the IP address. The Auth Server will respond to the request and provide the IP address of domain.com. Finally the DNS resolver will tell your browser the IP address of domain.com
Step 5 - Cache
The DNS resolver will store the IP address of domain.com in it's cache to avoid going through this process for this domain. Once the IP address reaches your browser the webpage will load.
Why should you care?
- It's how the world of networking operates. It's important to understand DNS as it helps with troubleshooting issues related to domains.
And that's it folks.