IBM Cloud Global

Cloud Global

Our mission is to provide clients with an online user community of industry peers and IBM experts, to exchange tips and tricks, best practices, and product knowledge. We hope the information you find here helps you maximize the value of your IBM Cloud solutions.

 View Only

Streamlining Connections, One DNS Query at a Time!

By Lavisha Bhatia posted Wed February 28, 2024 07:19 AM

  

In this digital realm where information flows like a river, DNS acts as the invisible current, guiding packets of data effortlessly from source to destination. It's the unsung hero behind every click, tap, and swipe, ensuring that the virtual highways remain clear and the pathways to knowledge remain open.

DNS isn't merely a technical protocol; it's the silent architect of our digital interactions, transforming complex algorithms into intuitive pathways. In this blog, let's take a journey into the world of the internet and meet our silent hero DNS.

The Crucial Role of DNS Security in Network Defense

Imagine you're exploring a vast city filled with millions of buildings, each with its own address. Just like in the real world, every website on the internet has its own unique address too. But instead of being something like "123 Main Street," these addresses are long strings of numbers called IP addresses.

Now, remembering all those numbers for every website you want to visit would be a real headache, right? That's where DNS comes in!
DNS, or Domain Name System, is like a giant phonebook for the internet. It translates easy-to-remember website names, like "google.com" or "facebook.com," into those complicated IP addresses that computers use to find each other online.

So, when you type a web address into your browser, DNS quietly goes to work behind the scenes, finding the correct IP address for that website. It's kind of like having a super-smart assistant who knows exactly where everything is in this vast digital world and helps you get there with just a simple click. DNS makes navigating the internet easy and fast, so you can spend less time remembering numbers and more time exploring the endless possibilities of the online world.

What Is DNS? Everything You Need to Know About the Web's Phone Book | PCMag

Let's explore further on how DNS actually works. 

DNS operates on a hierarchical structure, organized into zones and domains. At the top of this hierarchy are the root servers, which store information about the top-level domains (TLDs) such as ".com," ".org," and ".net.". Beneath the root servers are authoritative DNS servers, which hold information about specific domains and their associated IP addresses. Finally, there are recursive DNS servers, also known as resolvers, which help users navigate through the DNS hierarchy by querying authoritative servers on their behalf.

                                                                                                                     Types of DNS Servers

Remember:
"Authoritative" name servers create the phone book; "Recursive" name servers/resolvers use the phone book to look stuff up!!

Here is a Flowchart diagram to help you understand how a DNS query is resolved:


Considering you're already acquainted with how DNS works, we will next see how DNS communicates. 

DNS uses port 53 for communication and its one of the few protocols which uses both TCP and UDP.

UDP is primarily used for standard DNS queries, while TCP is used for larger queries or zone transfers where the response size may exceed the maximum limit for UDP.


DNS Records:

DNS (Domain Name System) records are crucial components of the DNS infrastructure, storing various types of information associated with domain names. These records are maintained by DNS servers and help in the translation of human-readable domain names into IP addresses and other relevant data. Here are some common types of DNS records:

  • A (Address) : Associates a domain name with an IPv4 address. For example, an A record for "example.com" might point to the IP address "192.0.2.1".
  • AAAA (IPv6 Address): Similar to the A record but used for IPv6 addresses. It maps a domain name to an IPv6 address.
  • CNAME (Canonical Name): Creates an alias for a domain name. It points one domain name to another domain name instead of an IP address. For example, a CNAME record for "www" might point to "example.com".
  • MX (Mail Exchange): Specifies the mail server responsible for receiving email messages on behalf of the domain. It points to the domain name of the mail server. For example, an MX record for "example.com" might point to "mail.example.com".
  • TXT (Text): Stores arbitrary text data associated with a domain name. It can be used for various purposes such as verifying domain ownership, configuring email authentication (SPF, DKIM, DMARC), and providing human-readable information.
  • NS (Name Server): Specifies the authoritative DNS servers for a domain. It delegates the responsibility of resolving DNS queries for the domain to the specified name servers.
  • PTR (Pointer): Performs reverse DNS lookup, mapping an IP address to a domain name. It is commonly used for reverse DNS resolution.
  • SRV (Service): Defines the location of services within a domain. It specifies the hostname, port number, priority, weight, and target domain for a particular service.
  • CAA (Certification Authority Authorization): Specifies which certificate authorities (CAs) are allowed to issue SSL/TLS certificates for a domain. It helps domain owners control the issuance of certificates and enhance security.

Learning all about DNS working is not enough. We should know how to troubleshoot it as well. 

When troubleshooting DNS issues, there are several commands and tools available on different operating systems that can help diagnose and resolve the problem. Below are some commonly used commands for DNS issue resolution:

  • nslookup: This command-line tool is available on most operating systems. It allows you to query DNS servers to retrieve DNS-related information, such as IP addresses associated with domain names, DNS record types, and name server details.
    Example:
    nslookup example.com
  • dig: Similar to nslookup, dig (Domain Information Groper) is a command-line tool used for querying DNS servers. It provides more detailed information about DNS responses, including additional record types and query options.
    Example:
    dig example.com

  • Dig +trace <domain-name> Trace domain resolution from root server to Authoritative name-server (top to bottom)
    Example:
    dig +trace drive.google.com

  • Whois <domain-name> Displays whois information of the domain
    Example:
    whois google.com

  • ping: While ping primarily tests connectivity to an IP address, it can also be used to troubleshoot DNS resolution issues by pinging the domain name. If the ping fails, it may indicate a DNS resolution problem.
    Example:
    ping example.com

  • ipconfig /flushdns (Windows) or sudo dscacheutil -flushcache (macOS): These commands flush the DNS resolver cache on the local machine, which can help resolve issues caused by stale or outdated DNS records being cached.

  • traceroute or tracert: These commands trace the route that packets take from your computer to a destination IP address or domain name. They can help identify network issues, such as routing problems or network congestion, affecting DNS resolution.
    Example:
    traceroute example.com

  • tcpdump or Wireshark: These packet sniffing tools capture and analyze network traffic, including DNS queries and responses. They can provide detailed insights into DNS communication between your computer and DNS servers, helping to diagnose complex DNS issues.

  • systemctl restart systemd-resolved (Ubuntu/Debian): This command restarts the systemd-resolved service, which is responsible for DNS resolution on modern Ubuntu and Debian systems. It can help resolve issues related to DNS service malfunction or misconfiguration.

  • service network restart (Linux): This command restarts the network service on Linux systems, which can sometimes resolve DNS-related problems caused by network configuration issues.

  • ipconfig /registerdns (Windows): This command refreshes and updates DNS records for the computer, which can help resolve issues related to DNS registration and updating.


In addition to above commands, there are certain websites (mentioned below) as well which help us in DNS troubleshooting :

https://dnschecker.org/
https://mxtoolbox.com/
https://www.whois.com/whois/

Finally, lets see what offerings IBM Cloud provide for DNS:

           

In wrapping up our exploration of DNS, it's clear that it serves as the backbone of the internet, enabling users to navigate the vast digital landscape effortlessly. As the internet continues to evolve, DNS remains an indispensable cornerstone, adapting to meet the ever-changing demands of the digital age.

Thank you for joining me on this exploration. Remember, the quest for knowledge knows no bounds, and I look forward to embarking on future journeys together. 

Until next time, happy browsing!!

1 comment
26 views

Permalink

Comments

Thu February 29, 2024 01:32 AM

Very useful info about DNS