Domain Name Service – DNS Explained with Example

By | November 26, 2023

What is DNS?

The term Domain Name System (DNS) is not new to the Internet environment. We will talk about what is DNS and how DNS lookup works.

DNS is an application layer protocol used throughout the Internet for translating hostnames into their associated IP addresses.

Every website and its subdomains have an IP address to be connected to and located on the internet. This means a whole lot of IP addresses, remembering the IP addresses of these websites is way not possible.

In other words, to connect and locate a website, you get to enter the domain name in your language, this is where DNS comes in…

DNS helps resolve the domain names to IP addresses so that you can connect to the website you typed in.

This system helps you find the IP address of the domain names you entered in your browser so that the browser can connect to the website.

When you click to locate a website and all its domains, the DNS service will scan the Domain Name System database and provide you with the IP address of the host to which you wish to connect.

Every Internet Service Provider or ISP has its own DNS server which receives name resolution requests from the subscribers of that ISP and resolves the requested hostnames to their corresponding IP addresses.

The domain names and sub-domains can be called aliases. The servers holding a database containing information on the addresses of different aliases are called Name Servers. There are two types of servers operating in the Domain Name System.

Types of DNS Servers

The Root Servers – these hold data about Top Level Domains (TLD: .com, .net and .org, etc.). The other types contain the addresses of servers that host your domains and sub-domains.

Example 1:

In the case of fbi.xyz.com, Root Servers will hold information about XYZ being a .com. Some other Name Server will contain database entries showing the address of xyz.com.

Since you also are hosting fbi.xyz.com, its address can be either on the same Name server holding the address of xyz.com or on a different Name Server. If you add yet another sub-domain to fbi.xyz.com, this address may be on the same or on a different Name server depending upon the ISP hosting it. Let’s look at it in a simplified form below:

XYZ is related to .com

FBI is related to xyz.com

If you add MVP as another sub-domain to xyz.com,

MVP is related to fbi.xyz.com

To establish the address of MVP, the Domain Name System Service will have to resolve:

.com

.xyz.com

.fbi.xyz.com

.mvp.fbi.xyz.com

The above illustration shows that DNS to resolve mvp.fbi.xyz.com, the DNS system has to scan the DNS database four times.

This sometimes becomes complex given that the addresses of different parts of the URL can be on different Name Servers. But as the speed of the Internet increases, you can see the page downloading in a matter of a few milliseconds and worst cases, a few seconds.

This is a case when the Domain Name System Service is not using any cache. We will talk about caches a little later in this article.

How DNS Lookup Works.

The process of finding out and resolving the IP address of any URL on the Internet is known as DNS lookup.

With the basic examples above, you must now be able to grasp that there are different servers hosting databases that contain the IP addresses of different domains and their sub-domains.

You should also know that there are Root Servers that hold the IP address of servers hosting Top Level Domains.

These Root Servers’ main aim is to reach the servers containing databases that hold the IP address of the main domain name.

If there are sub-domains, their address can be on the same servers as the main domain name or on a different server.

All the servers mentioned above are accessible for finding out the IP address of the exact URL that you need to use.

To find out how DNS Lookup works, take the following example.

If computer C needs to use the printer attached to computer E, C will check the database on F’s computer to know the IP address of E and then find out the address of the printer attached. Only after obtaining the address of the printer, F will route the print command to the printer attached to E.

The above method is used to look up DNS records. For example, when you click on https://orbit-computer-networking.com, your router will contact your default DNS Service for DNS resolution.

The DNS service will contact Root Servers and ask for the IP address of the server containing .com records.

This address is sent back to your DNS service. The DNS service again reaches the Name Server containing addresses of .com domains and asks it for the address of https://orbit-computer-solutions.com.

Upon obtaining the IP address of the servers that host orbit-computer-networking.com, your DNS service will return the IP address to your computer which then fires up your browser to download the main webpage. This means your DNS service is sending at least two requests to receive the IP address of a simple domain name.

IPv4 Addressing DHCP DHCPv6 IPv6