Home  »  Articles   »   How Does the Domain Name System (DNS) Work?

How Does the Domain Name System (DNS) Work?

If you have no idea what DNS stands for then you have come to the right place. So strap in and five minutes you will be ready to dazzle your peers at your local watering hole. For the somewhat informed you might not learn anything new, but hey! Stick around for the ride.

What does DNS Stand For?

DNS as what Domain Name System is better know as in simplest terms is a decentralized way of naming and retaining details about all systems including computers, services, hardware, resources and more that are connected to the Internet. Each of these entities are assigned what is called a domain name. The unique domain name then has other detailed information including other names behind it that are used to facilitate services, computers and other entities under that domains jurisdiction.

In a simple illustration it is the equivalent of hailing down a cab and telling the driver to take you to Mr. Example’s House. The taxi driver would be able to interpret that command if he had additional information about where Mr. Example’s house actually is. In reality you would have to tell the driver where the address actually is.

Authoritative Name Servers

The responsibility of assigning, mapping and maintaining domain names belongs to special computers called Authoritative Name Servers. There was a time in the early days of DNS when the said information was stored in text files on various computers normally called hosts or hosts.txt depending on the underlying computer operating system.

Domain Names

The domain names commonly used on the Internet that are maintained on the DNS servers are the names that contain the format “nameexample.extension”. An example would be brightwhiz.com. domain names are divided into levels of sub-domains numerated from left to right. For instance, in a  domain name such as www.brightwhiz.com, example is a sub-domain of com and www is a sub-domain of brightwhiz. The type of domain illustrated is know as a top-level domain. Other types of domains examples include second-level domains, country-level domains etc.

Address Resolution

Most DNS systems have the addresses cached for quicker resolution of resource locations. The address in question is the IP address. IP addresses in simplest terms are a set of numbers between 0 and 255 in the format xxx.xxx.xxx.xxx. The format illustrated here is the IP version 4 format. There is an updated IP version 6 format which we will be discussing here in a later article.

How Accessing a Web Page Works

In a nutshell, access to website can be summarized with this example. Assuming you want to access brightwhiz.com. Normally you would fire up your preferred web browser and type in www.brightwhiz.com. What would happen is the browser would access the DNS server which in turn would query the cache.

The information on the cache would show which IP address hosts the website. The browser would then access the website from the IP address on record. How about in the case where the cache is not present for whatever reason?

The browser would contact the root nameserver. The root nameserver will see that brightwhiz is under the “com” domain. The browser would then be pointed to the com nameserver IP address. In turn the com nameserver would query its records and find brightwhiz and retrieve its IP address and point to the brightwhiz.com nameservers IP address. The brightwhiz.com nameserver would then point to the ip address where the website is hosted based on the records stored there. This would include further sub-domains such as www and others.

The same happens for accessing other Internet services for that domain such as IP, SMTP, Mail Exchanges and others. Now you have a basic understanding of how DNS plays its role to make the Internet work.

https://tools.ietf.org/html/rfc1034 – Domain Names – Concepts and Facilities
https://tools.ietf.org/html/rfc1035 – Domain Names – Implementation and Specification
https://tools.ietf.org/html/rfc3467 – Role of the Domain Name System (DNS)

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.

Available under: