New
Master the  DNS Magic: Understand the Powerful this Framework Fueling Internet Navigation in 5 Minutes.

Master the DNS Magic: Understand the Powerful this Framework Fueling Internet Navigation in 5 Minutes.

Introduction 

The Internet is a vast global network of interconnected computers and devices using common communication protocols to exchange information and data.  most of the time, this global network is called “the web.”  With the magic of the web, you could sit comfortably in your house in North America and communicate with your friend in China or request information from a website in Australia.  Have you ever wondered, among all the millions of computers and devices connected to the internet, how your computer is able to identify your friend’s specific computer to send your message?

Or how your computer identifies among millions of websites on the internet the exact website from which you wanted to request information in Australia.   All of this is possible due to the magic of DNS or  “Domain Name System.” In this article, I will explain how DNS works, its components, and why DNS is important for computer networking. 

How does DNS work

Let’s consider an example. You want to call someone, but you don’t remember his or her phone number.  You use a phone book or the phone book on your phone to get the person’s phone number using its name.   This is exactly the role of DNS. Think of DNS as a giant phone book for the internet. Just like a phone book helps you find someone’s phone number by looking up their name, DNS helps your computer find a website on the internet by looking up its name or IP address. The DNS job is to resolve a website’s name into an IP address. 

When you enter a website’s name in the URL bar on your computer, the computer does not understand the name entered. The computer needs to translate it into an IP address (number) to understand it.  This translation is done by leveraging the local DNS cache on the computer.  The browser will send a recursive DNS query message to the network to find out which IP or network address the domain corresponds to.   If the local cache does have the address, it is going to make a DNS request to the ISP DNS server ( Internet  Service Provider). If the ISP does not have the address cache locally, it will make a DNS request to the root DNS Server.

  The root DNS server will send the IP back to the ISP.   the ISP DNS server will cache the address for future reference and it will send it back to your computer.  So now your computer knows where the website is located. Now, the request is going to be sent to the website using the IP address.  Browsing the internet and most other internet activities rely on DNS to provide information necessary to connect users to websites and other remote hosts.  DNS system mapping is widely distributed across the internet in a hierarchy of authority.

What is an IP address? 

IP stands for Internet protocol. It is a unique identifier for any device connected to the internet.  The IP address is the electronic address or the location of the device on the network.  It allows the device to connect and communicate with other devices on the network. IP addresses are notated by a series of 4 sets of numbers separated by periods, for example, 192.168.1.25.  Typically, IP addresses are made up of 32 binary bits (1s and 0s that the computer uses to communicate).

Brief history of the DNS

Before the birth of DNS, computer communication relied on users to remember IP addresses. For example 

  • ARPANET (1970)  keeps the mapping of hostname and IP address in a Text file called “HOSTS.TXT” This file was distributed among all the computers on the network. 
  • DNS was created (1983).  The DNS was introduced by Paul Mockapetris and Jon Postel
  • DNS hierarchy was implemented (1980). The DNS system introduced a hierarchical structure with different levels like top-level domains (TLDs) and subdomains. Commercialization of top-level domains or (TLDs) such as “.com,” “.net,” and “.org”

  • ICANN was formed (1998). The Internet Corporation for Assigned Names and Numbers (ICANN) was established to manage DNS and domain names. It has become a crucial role in coordinating the global DNS system. 
  • DNSSEC was introduced(2000s) DNS Security Extensions (DNSSEC) were introduced to enhance the security of DNS by adding cryptographic signatures to DNS data, reducing the risk of DNS spoofing and other attacks.

  • IPv6 was introduced. Due to the rapid expansion of the internet, many devices need to be connected. The IPv4 address pool was reduced, and more new solutions were needed.  With the depletion of IPv4 addresses, DNS became essential for transitioning to IPv6, which introduced a much larger address space.
  • Global expansion of new TDL. The number of TLDs expanded significantly, including the introduction of generic TLDs like “.info,” “.biz,” and many others. This diversification allowed for more specific domain names.

Watch the full video here!

Different types of DNS server

DNS Recursion Server:

A DNS recursion server is responsible for resolving DNS queries on behalf of clients. When a client, such as your computer or a local network, makes a DNS query for a domain name, the recursion server will search for the IP address associated with that domain.

If the recursion server already has the requested information in its cache, it will respond immediately. If not, it will query other DNS servers hierarchically to find the IP address. It might start with the root server and work its way down through the hierarchy.

Root Nameserver

The root nameservers are the initial point of contact in the DNS lookup process. They are a crucial part of the internet’s infrastructure and maintain a list of all top-level domain (TLD) nameservers. There are 13 sets of root servers strategically located around the world. These servers don’t know specific IP addresses for domains but can direct queries to the appropriate TLD nameservers.

TLD (Top-Level Domain) Nameserver

TLD nameservers are responsible for top-level domains like .com, .org, .net, etc. When a query is made for a domain within a specific top-level domain (e.g., example.com), the TLD nameserver stores information about the authoritative nameservers responsible for the second-level domains under the TLD.

TLD nameservers provide information on which authoritative nameservers store the DNS records for a particular domain.

Authoritative Nameserver

Authoritative nameservers store the DNS records for a specific domain or subdomain. When a request reaches an authoritative nameserver for a domain, it holds the definitive records that map domain names to their associated IP addresses. For instance, if someone queries “www.realcoderacademy.com,” the authoritative nameserver for “www.realcoderacademy.com holds the accurate information to resolve that domain to the respective IP address.

These different types of DNS servers work together in a hierarchical manner, with queries moving from the client to the root servers, through TLD servers, and finally to the authoritative name servers, to resolve domain name queries and provide the necessary IP address information for internet communication.

What are the different types of DNS records?

DNS records are essential components of the Domain Name System (DNS). They contain crucial information about domain names, such as their associated IP addresses, mail servers, and other data necessary for the proper functioning of the Internet. These records are stored in DNS servers and help in translating human-readable domain names into machine-readable IP addresses. Each record type serves a specific purpose in mapping domain names to their corresponding information. This is a list of most  common types of DNS records and their functions:

A (Address) Record:

This record maps a domain name to an IP address. It is used to translate a domain name to the IP address of the server where the website is hosted.

CNAME (Canonical Name) Record:

The CNAME record is used to create an alias for a domain. It allows a domain to be pointed to another domain name, effectively serving as a pointer or alias for another domain.

MX (Mail Exchange) Record:

MX records specify the mail server responsible for receiving email on behalf of the domain. They direct emails to the correct mail servers associated with the domain.

TXT (Text) Record:

TXT records contain text information and are typically used to verify domain ownership, provide SPF (Sender Policy Framework) data for email authentication, or for other miscellaneous purposes.

NS (Name Server) Record:

NS records specify the authoritative name servers for a domain. They indicate which DNS servers are authoritative for a particular domain, directing queries to the appropriate servers.

SOA (Start of Authority) Record:

The SOA record stores important information about the domain, such as the primary name server for the domain, the email of the domain administrator, and other DNS information.

PTR (Pointer) Record:

PTR records perform the reverse function of an A record, translating an IP address into a domain name. They are commonly used in reverse DNS lookups.

SRV (Service) Record:

SRV records define the location of services such as VOIP, Instant Messaging, and other services associated with a domain.

These records collectively form the DNS database and provide the necessary information to route traffic, handle email, authenticate domains, and perform other critical functions on the internet. DNS records are managed by domain registrars or hosting providers, allowing users to configure and update these records to ensure their domains function correctly.

What is a reverse DNS

Reverse DNS (rDNS) is the inverse of the standard DNS process. While traditional DNS resolves domain names to IP addresses, reverse DNS performs the opposite function by resolving IP addresses back to domain names.

The primary purpose of reverse DNS is to associate an IP address with a domain name. This can be valuable in various scenarios:

Email Servers: Many email systems use reverse DNS checks to verify the legitimacy of the sending mail server. When an email server connects to deliver an email, the receiving server might perform a reverse DNS lookup on the connecting IP address to ensure that the server has a valid reverse DNS entry.

Network Troubleshooting: Reverse DNS can be beneficial in network administration and troubleshooting. Knowing the domain name associated with an IP address can aid in identifying potential issues or the origins of traffic, facilitating network management and security analysis.

Logging and Auditing: It’s used in logging and auditing, providing a way to better track and identify the sources of network traffic or potential security threats.

The implementation of reverse DNS involves creating a special type of DNS record called a Pointer (PTR) record. This PTR record is the opposite of an A (Address) record in standard DNS. Instead of mapping a domain name to an IP address, a PTR record maps an IP address to a domain name.

Reverse DNS is particularly useful in maintaining the integrity and security of networks, as well as aiding in various operational and diagnostic processes by providing a way to identify the domain associated with an IP address.

Conclusion

The Domain Name System (DNS) stands as an integral backbone of the internet, serving as a decentralized, hierarchical directory that translates human-readable domain names into machine-readable IP addresses. It plays a pivotal role in enabling the seamless communication and connectivity of devices and services across the global network.

At its core, DNS operates through a hierarchical structure involving various types of DNS servers—such as the root servers, top-level domain (TLD) servers, authoritative servers, and recursive servers—which work collaboratively to resolve domain name queries.

Through its system of records, including A, CNAME, MX, and others, DNS stores and manages essential information about domains and their associated resources. These records aid in the mapping of domain names to specific IP addresses, directing emails to the correct mail servers, authenticating domains, and more.

Moreover, the concept of DNS zones allows for the management and organization of specific portions of the DNS namespace, empowering administrators to control and maintain DNS records for their respective domains or subdomains.

In conclusion, the Domain Name System serves as a fundamental infrastructure of the internet, providing the means for users to access websites, send emails, and connect with various online resources. Its hierarchical and distributed architecture, supported by diverse types of servers and records, ensures the efficient resolution and functionality of domain names, playing a crucial role in the functioning and accessibility of the digital world.

Leave A Reply

Your email address will not be published. Required fields are marked *