DNS Resolution

Understanding DNS: A Simple Explanation

DNS stands for Domain Name System, often called the Internet's phone book. In my previous blog, we discussed the thought process behind DNS resolution. Today, we will explore it in detail using the 'chunking' method.

Breakdown of the DNS Resolution Process

Terminology

  1. DNS Recursor - It acts like a middleman between you and the servers. Its primary job is to provide you with the IP address of the server you are looking for.

  2. Root Name Server - Think of it as the royal family of servers. The term 'root' means it's the first place the DNS recursor will contact. There are a total of 13 Root Name Servers in the entire world!

  3. TLD - TLD stands for Top-Level Domain, which tells us what type of category the domain belongs to, such as (.com) or (.org).

Authoritative Name Server - An authoritative name server (ANS) is like a directory that keeps information about domains and their IP addresses. ANSs are the last step in a nameserver query, giving answers to recursive DNS nameservers.


What is DNS? Why do we need them?

Before we learn how DNS works, let me explain why we need it. Let's use a simple example. Imagine you work at a supermarket cash counter and need to create a bill for a chocolate bar(‘Kit Kat’). How would you find the product code for the chocolate? First, you would go to the Chocolate Section, then find the manufacturing company, then the product type, and finally, you would find the product with its code. To make this easier, a scanner is used and the sofware does the job for you. Here scanner is the browser of your system and the software is the DNS Recursor.


Resolution Process

Finally, we have enough resources and understanding to learn how the resolution process works. To make it even simpler, we'll relate it to a common method in everyday life.

Where do you go to buy your medicines?

Medicine store, right? So, can you identify who the user is and who the DNS recursor is?

Very well, that wasn't hard to understand. Now think about how the pharmacist finds the medicine. Wouldn't he search on his computer and then locate the shelf number? Similarly, when we type an address like www.example.com, the browser sends a GET request to the DNS Recursor to find the address. Then, the recursor requests the Root Name Server for the IP address. In response the Root Name Server provides the TLD(Top Level Domain) of the address.

Great job! The pharmacist found the shelf number, so did he find where the medicine is? Similarly, you have the TLD of your request. Do you think you have the IP address of the site you searched for?

No, right? But don't worry, the DNS Recursor is smart enough and therefore it responds to the TLD and provide the address of the website you searched for.

Just like the pharmacist finds the cabinet or shelf for your medicine, the TLD sends you the Authoritative Domain of your request, which contains all the information about your website.

Finally, the pharmacist finds the cabinet and gets your medicine, just like the Authoritative Name Server, which has the details of your website, responds to the DNS Recursor with the IP address of your website.

Congratulations! The pharmacist now hands you the medicine, just like the DNS Recursor sends the IP address of the website to your browser (client), which then redirects you to the website.


Feeling overwhelmed? Such a simple process involves many complex steps to get you the IP address.

Challenges with DNS

DNS resolution issues can cause network outages, especially in complex networks. A single DNS server misconfiguration can lead to widespread failures. Troubleshooting these problems is challenging, as it involves checking each server in the DNS lookup process. Additionally, issues can arise from client-side settings, which organizations may not control. Another challenge is the reliance on a few third-party DNS providers, creating a single point of failure that can lead to global service disruptions. These providers are also prime targets for DDoS and cache poisoning attacks, limiting organizations' ability to handle outages if they depend on one provider.

Conclusion

In conclusion, DNS resolution is a critical component of internet functionality, translating user-friendly domain names into IP addresses that computers use to identify each other on the network. This process, while seemingly straightforward, involves multiple steps and components, including DNS Recursors, Root Name Servers, TLDs, and Authoritative Name Servers. Each plays a vital role in ensuring that users can access websites quickly and efficiently. However, the DNS system is not without its challenges, such as potential misconfigurations, reliance on third-party providers, and security threats like DDoS attacks. Understanding these complexities and challenges is essential for maintaining a stable and secure internet experience.