Fundamentals of Domain Naming System Explained

Category Digital Operations

An engineering career is a marathon, and understanding the fundamentals is crucial for long-term success. Before taking a deep dive, it is important to understand the fundamentals of DNS:

Server: A server is a program or device that provides services to clients. A client is typically another program that requests information from the server. Even if you run a program on your local computer serving requests from other programs on the same computer or another computer in a shared network, your computer acts as a server in this scenario. When we talk about servers, we often refer to devices with significant capacity in data centers, but the fundamental concept remains the same.

IP Address: Devices communicate on the internet using IP addresses. To ensure communication goes to the right device, each device is assigned an IP address. While IP addresses are an extensive topic, we’ll keep our discussion focused on the main topic. As a side note, IP addresses are typically of two types: IPV4 and IPV6.

Domain Name: A domain name is a human-readable string that users can easily enter into a web address, such as www.google.com. It’s important not to confuse domain names with URLs. URLs are specific to web pages, while domain names refer to websites or web apps. To obtain a domain name, users can register them with domain name registrars, which are dedicated businesses for managing and creating new domains. eg: Godaddy, Bigrock, etc.

Top-Level Domain (TLD): The TLD is the last segment of the domain (e.g.: .com, .net). It is also known as the domain suffix or extension.

Cache: Cache is a mechanism for temporary storage by copying files in a storage location for faster access.

Now we had addressed some of our basic concepts, let’s dig into DNS now.

The code for a website built by any developer is stored on a server. As the server is on the internet, it has its IP address. To get the code from this server, you need to request the server’s IP address. However, IP addresses are complex and challenging for users to remember. Humans are better at remembering names than numbers, which is why we have phone numbers stored against names.

Thus, users find it easier to remember domain names rather than IP addresses. However, servers can be found by IP address, not the domain name. This is where we need one more server to keep records of IP addresses and map them to domain names. This intermediate server is known as a Domain Naming System or DNS.

A DNS is not a single server but a group of usually four servers: DNS resolver, Root nameserver, TLD nameserver, and Authoritative nameserver. Retrieving the IP address from DNS can be resource-intensive, so the system is designed to minimize DNS calls. When you enter a domain name, your device first checks for the IP address in local DNS cache files, browser cache files, and ISP cache. If the IP address is not found in any of these caches, the DNS IP address retrieval process begins, involving a four-step process with the four servers discussed below:

DNS Resolver: This server acts as an intermediary between the client and other DNS servers. It first looks for the IP address corresponding to the domain name in its cache. If the record is not found, the request is sent to the next server, the Root nameserver.

Root Nameserver: The Root nameserver identifies the top-level domain from the request received from the DNS resolver and determines the location of the next server to which the request needs to be sent. This next server is the TLD nameserver.

TLD Nameserver: There could be multiple TLD nameservers based on the top-level domain. The Root nameserver selects the correct TLD nameserver. The TLD server further sends the request to the Authoritative Nameserver.

Authoritative Nameserver: This is the final server in the IP address retrieval process. It looks up the exact matching IP address for the domain and responds accordingly. It’s important to note that the DNS resolver caches the IP address for subsequent requests for the same domain.

Additional concepts regarding the Domain Naming System:

Domain Namespace: It is the set of all domain names in a DNS and represents a tree data structure. The root node has top-level domains as children, and further down are second-level domains.

Domain Zone: This is a part of the domain namespace reserved for administrative purposes.

A Record: It translates the domain name to an IPv4 address, and this is the primary purpose of DNS.

AAAA Record: Similar to A records, AAAA records convert domain names to IPv6 addresses.

CNAME Records: These are also known as canonical name records. CNAME records allow us to point subdomains to the desired main domains.

MX Records: MX records stand for mail exchanger records. They identify the mail servers to process incoming emails for a domain. If we want to configure a third-party site as an incoming mail server, we need to edit the MX records.

DNS Propagation: When we add a new DNS record, it takes time to update across all servers. This time is called DNS propagation time.

DNSSEC: It is an added layer of security that allows access to DNS records only after authentication.

This covers the fundamentals of DNS, but please keep in mind that DNS is a complex architecture with much more to explore. Feel free to reach out for any questions or feedback.

Author: Atish Raina

Write to us at Nineleaps to know more.

Ready to embark on a transformative journey? Connect with our experts and fuel your growth today!