Connect with me

A Comprehensive Guide to DNS Resolution

networking concepts Dec 11, 2023

Introduction

Assuming we've already explored the basics of the Domain Name System (DNS) as covered in the previous post at DNS Explained: Understanding the Internet's Address Book, let's take a closer dive into the DNS resolution process. This is where we connect the dots, turning a domain name like www.cloudericks.com into an actual IP address that our computer can understand and connect to.

The DNS Resolution Journey

DNS resolution is an incredible journey from the moment we type a website name into our browser to the point where our computer displays the website. Let’s explore this process step by step:

  1. DNS Query: Starting the Search

    When we enter www.cloudericks.com in our browser, our computer begins the DNS resolution process by sending a DNS query to a resolver. This resolver is most commonly provided by our Internet Service Provider (ISP) and acts as the first point of contact in locating the website's IP address. Think of this query as akin to asking our phone's voice assistant for the address of the nearest pizza shop - it's the first step in pinpointing the exact location of the website we want to visit.

    Please note that the ISP's DNS resolver is not the only type of resolver. Depending on our network setup and personal preferences, the resolver can vary. Alternatives include a Custom DNS Resolver (like Google Public DNS or Cloudflare DNS), a Local Network Resolver within an organizational network, a Router acting as a DNS Proxy in home networks, or resolvers provided by Mobile Network Operators. However, for simplicity, we'll assume that we're using our ISP's DNS resolver in our explanation.

  2. Resolver: The Local Assistant

    Once the DNS query reaches the resolver, typically provided by your ISP or another service, as mentioned earlier, it acts like a local assistant in your journey to access www.cloudericks.com. The resolver performs an initial check in its cache – a stored memory of recent website lookups. If it has recently processed a request for www.cloudericks.com, it will quickly respond with the stored IP address.

    If the resolver doesn't have the information cached, it doesn't stop there. It then takes on the role of an investigator, beginning a more extensive search across the internet's DNS infrastructure to find the exact location of www.cloudericks.com. The next stop in this investigative journey is the root nameserver.
  3. Root Nameserver: The Global Directory

    When the resolver does not find the IP address in its cache, it reaches out to the root nameserver. Think of root nameservers as the global directories of the internet. They don't store specific website addresses but provide guidance on where to find detailed information. For a website like www.cloudericks.com, the root nameserver recognizes .com as the top-level domain (TLD) and directs the resolver to the appropriate TLD server that manages .com domains. This step narrow down the search from the global level to a more specific domain level.

  4. TLD Server: The Specialized Guide

    Assuming we are dealing with a .com domain like www.cloudericks.com, the resolver, directed by the root nameserver, now consults a TLD (Top-Level Domain) server specifically for .com domains. The TLD server acts as a specialized guide in the DNS resolution process. It narrows down the search by pointing to the specific nameserver that is responsible for information about www.google.com. This step moves the resolver one step closer to finding the exact IP address by directing it to the domain's authoritative source, which is the Authoritative Nameserver.

  5. Authoritative Nameserver: Getting the Exact Address

    Finally, in the DNS resolution process, the resolver reaches out to the authoritative nameserver for www.cloudericks.com. This nameserver is the definitive source for the actual location of www.cloudericks.com on the internet and is responsible for maintaining and providing the domain's exact IP address.

    To manually find out the authoritative nameserver for a specific domain, such as www.cloudericks.com, for your own understanding, there are a couple of methods you can use:
    1. Online DNS Lookup Tools: Websites like mxtoolbox.com, dnschecker.org, or whois.net are convenient for quickly obtaining DNS information, including the authoritative nameservers for any domain.

    2. Command-Line Query:

      • Use the command: nslookup -type=NS cloudericks.com
        • Note: In Windows, this is done in the Command Prompt; on macOS/Linux, it can be executed in the Terminal. Please note that the availability of nslookup might depend on the specific Linux distribution and its installed packages. In most standard installations of Linux distributions like Ubuntu, Debian, Fedora, and CentOS, nslookup it is included as part of the bind-utils or dnsutils packages.
      • Additionally, macOS and Linux users have the option to use the command dig NS cloudericks.com in the Terminal for similar results.

 

There's More: Understanding nslookup Query Results

Recently, I performed an nslookup query for my domain, cloudericks.com, to illustrate how this tool provides insights into DNS configurations. Here's a screenshot of the query results:

Now, let's break down what these results tell us:

  1. Server and Address: The response begins by identifying the local DNS resolver (192.168.0.1). This is likely the default DNS server provided by your ISP or your home router. The #53 indicates that the DNS server is using the standard port 53 for DNS services.

  2. Non-authoritative Answer: This section lists the nameservers for cloudericks.com - jermaine.ns.cloudflare.com and joyce.ns.cloudflare.com. These are the nameservers provided by Cloudflare, indicating that Cloudflare manages the DNS for cloudericks.com. The term "non-authoritative" means this information is from the local DNS cache and not directly from the domain's authoritative nameserver.

  3. Authoritative Answers: Here, the IP addresses for Cloudflare's nameservers (jermaine.ns.cloudflare.com and joyce.ns.cloudflare.com) are provided. These IP addresses are where the nameservers can be accessed on the internet. The list includes both IPv4 (labelled as internet address) and IPv6 (labelled as has AAAA address) addresses, ensuring the nameservers are reachable over both IP address formats.

This nslookup result provides a clear view of the DNS configuration for cloudericks.com, showing that it uses Cloudflare's DNS infrastructure. 

Conclusion: The Magic Behind the Screen

And there it is! Our computer now knows how to find www.cloudericks.com and promptly takes us there. This whole DNS resolution process, often happening in milliseconds, is a sophisticated dance of queries and responses that make internet browsing smooth and intuitive.

Through our deep dive into DNS resolution and practical exploration with tools like nslookup, we've seen the intricacies of this process. The real-world application of these concepts, as demonstrated with the nslookup results for cloudericks.com, highlights how DNS configurations, such as those managed by Cloudflare, are structured.

DNS resolution is more than just a technical process; it's the lifeline of internet connectivity, bridging the gap between human-friendly domain names and the numerical IP addresses that form the core of internet communication. 

Stay connected with news and updates!

JoinĀ the mailing list to receive the latest news and updates from our team.
Don't worry, your information will not be shared.

We hate SPAM. We will never sell your information, for any reason.