Making Sense of DNS

by Mike on March 23, 2010 · 1 comment

in DNS Server

Originally, users of the Internet, when it was still known as ARPAnet, were forced to use a hosts file called HOSTS.TXT which did the conversion of the name to an  IP Address (like 192.168.2.34)   by downloading a large file from a central location that listed all of the hosts on the Internet and their IP Addresses.   As the network grew, this soon became a situation that could not continue based on the sheer size and the rapid growth of the Internet.
Domain Name Service (DNS) was created in 1983 out of the necessity to convert domain  names to  IP Addresses like 192.168.9.2 .   DNS is a distributed database, what this means is that no one computer is used to maintain a complete database of all of the domains on the Internet.   Instead this information is distributed across many computers.    To further understand how this works,  take a look at the DNS structure:

Notice how the DNS namespace resembles an inverted tree.  The top node, symbolized by a single dot, is known as the root.  Below the root, you have the top-level domains like: com, net, org, mil, gov, etc. There are many top-level domains and now even international domains so the number is almost unlimited for top-level domains.

Consider the web address:

mail.example.org

How do you access mail.example.org to see your web based email?

There are two components to DNS to help you get where you want to go.  There’s the resolver, which resides on client computers, and the nameserver. When someone tries to access a website from their computer, the resolver on their computer sends a query to the nameserver that’s listed in the resolver’s configuration file.  The nameserver may or may not know how to access this site.  If it does, fine, the client computer is directed to the site.  If it doesn’t know how to access the site, then it will send the query to the root nameserver.  The root nameserver will see that the address is part of the “org” domain, and will send the query to a “org” nameserver.  The “org” nameserver will see that the query is for “example.org”, and will send the query to a lower-level nameserver that may know about “example.org”.  It still doesn’t stop there, since  the client also specified that they are  asking for a web site (mail), instead of something else, like an ftp site (ftp).  So, the lower-level nameserver will then forward the query to another nameserver that knows how to find the “mail.example.org” web server.

Notice that the nameserver returns an IP Address for the “mail.example.org” because the routing to access the actual site must go through routers and switches that only understand the addresses based on these numbers.  So the real function of the nameserver is provide two things to the client; the ability to search for answers and the provision of an answer in the form that allows the client to access the site requested.

{ 1 comment }

Husain Al-Khamis March 31, 2010 at 4:45 am

What a huge evolving step!! From a single file to a complete service running around the world through connected servers! Imagine the Internet now without the DNS..
Just to mention that as far as I know there are two different resolution techniques: Iterative and Recursive… That was a question came in the exam when I was enrolled in the networking course…

Previous post:

Next post: