Introduction to DNS
DNS or Domain Name System resolves the hostnames/ user-friendly names to corresponding IP addresses. As an example, when someone types “abc.com” on their browser, the request goes to DNS server to resolve the hostname ‘abc.com’ to IP address (220.127.116.11 in this case) as the network works on IP addresses and not on hostnames. Hence DNS makes human life easy as we have to remember only the hostnames/URLs and not the numeric IP address for each website.
Browsing through some of free domain website will provide good understanding on the services the DNS providers give and DNS related nuances.
What is the structure of DNS?
DNS uses a hierarchy to manage its database system. The DNS hierarchy (domain name space) is an upside down tree structure like a Directory. The DNS hierarchy or DNS Tree includes ne domain at the top of the structure called the root domain. A period or dot (.) is represents the root domain. Underneath the root domain exist the top-level domains that divide the DNS hierarchy into segments.
Enlisted below are the top-level domains of DNS and the respective organization types that use them. Further, under the top-level domains, the domain name space is additionally separated into subdomains which represent individual organizations.
Domains under the top-level domains represent individual organizations which can be further divided into subdomains in order to ease administration of an organization’s host computers.
Any domain which is included in a subtree will be considered as a part of all domains above it. Therefore, company abc.companya.com is now part of the .com domain.
How Does DNS Work?
In a usual DNS query, the URL typed in by the user has to traverse via four servers for providing the IP address. These four servers need to work with each other in order render the correct IP address to the client, and they include following:
- DNS Recursor: The DNS recursor, also known by the name of DNS resolver, receives the query from the DNS client. Next, it communicates with other DNS servers for finding the right IP address. After the resolver retrieves the requested info from the client, the resolver will start acting like a client itself. As it performs this, it will make the queries which will be sent to the other three DNS servers i.e., root nameservers, authoritative nameservers and (TLD) top-level domain nameservers.
- Root Nameservers: The root nameserver is selected for the internet’s DNS root zone. Its job is to answer/respond to requests sent to it for records in the root zone. It is responsible for answering the requests by sending back a summary list of the authoritative nameservers that go along with the precise TLD.
- TLD Nameservers: A TLD nameserver is responsible for keeping the IP address of the second-level domain contained within the TLD name. It will in that case release the website’s IP address and directs the query to the domain’s nameserver.
- Authoritative Nameservers: An authoritative nameserver is one which provides the real answer to your DNS query. There are primarily 2 types of authoritative nameservers as below:
- A primary nameserver or master server
- A slave server or secondary nameserver
The master server retains the original replicas of the zone records, even though the slave server is an exact replica of the master server. It will be responsible for sharing the DNS server load and acting as a backup in case the master server fails.
Authoritative DNS servers vs Recursive DNS servers
When your computer wants to find the IP address associated with a domain name, it is responsible for first making its request to a recursive DNS server, also known by the name of recursive resolver. A recursive resolver is a server which is generally functioned by an ISP or any third-party provider, and has the understanding of which other DNS servers it needs to query in order to resolve the name of a site with its respective IP address. The servers that hold the required information are called authoritative DNS servers.
DNS Query & its Types
A DNS query is the process of a computer or networking device making an inquiry to get an IP address for a DNS name such as google.com.
A computer trying to access google.com generates a DNS query and sends it to local DNS if any or to the ISP’s DNS for the name > IP resolution.
There are three types of DNS queries:
- Iterative queries
- Recursive queries
- Inverse queries.
What is the Difference between Free & Paid DNS Servers?
In some cases, a regular user may not be requiring a paid DNS server. However, premium DNS has significant benefits as shared below –
- Dynamic DNS (DDNS): A DDNS maps internet domains, matching them to IP addresses. This allows you to get into the home computer in spite of being anywhere in the world. DDNS is different from a regular DNS because it works by changing its database of dynamic Public IP addresses, making them a preferred choice for users of home networks.
- Secondary DNS: A secondary DNS nameserver makes sure that your domain does not go offline. It delivers you with a redundancy that can be accessed in the event of a complication or challenge.
- Management interface: Many paid DNS servers offer users a dashboard they can use to manage their service and tweak it according to their needs.
- Two-factor authentication: You can provide protection for your domain with an extra level of authentication.
- More security: When you make use of a paid DNS server, you get another protective level of security. This helps protect the website from attackers.
- Better, faster performance: A paid DNS server comes with a service-level agreement (SLA). Each SLA assured a high rate of DNS resolution, frequently between 99% and 100%.
- Customer service: With a paid DNS server, you get the additional advantage of customer service that can answer questions and troubleshoot any issues.
Are you preparing for your next interview?
If you want to learn more about DNS, then check our e-book on DNS Interview Questions and Answers in easy to understand PDF Format explained with relevant Diagrams (where required) for better ease of understanding.