Domain Name Services: Postman of the Internet

Domain Name Services (DNS) is a service which exist to help us humanize the addresses of networked resources. Humans remember words as a whole easier than numbers representing octal based Internet Protocol addresses of those same networked resources be them across the Wide World Web or just an arms length away on our local network.

That was a mouth full. Essentially through DNS you can type in a URL into your favorite web browser and through the process of name resolution your system contacts a server acting in your behalf to find the correct IP address that matches the human oriented address you type in.

Sounds simple but a lot of chatter between various servers near and far may happen just to pull up that favorite site that you wish to view. First your own system will see if it has the particular IP/URL pairing locally in it’s own tables. On your computer this information will be kept in a host.txt file and depending on the operating system the location varies.

Application resolving www.microsoft.com to the various IP addresses the site uses.
Application resolving http://www.microsoft.com to the various IP addresses the site uses.

Now if you have been to the requested site/named resource recently  the host file will give the name to IP resolution needed for your computer to send you on your way for the requested web page or networked resource.

What if you have never been there or an entry has never been made to the host file for the site?

Your system then contacts a DNS server generally your gateway for home users or an actual DNS server in a business environment. From here the resource name can be resolved to the IP address if, again, the server has an entry for the named resource or URL. Generally servers will keep hostname entries for a configured amount of time which varies from administrator to administrator unless the entry is marked to stay static and not change or be removed.

Removal of DNS or Host Name entries is called DNS Flushing. This is done periodically to keep the host file from growing into an unmanageably large file in most business environments.

DNS Request/Reply as explained in article.
DNS Request/Reply as explained in article.
Image courtesy of D²

Ok, now you have reached a point where none of our locally networked systems know the IP address for the URL you are entering into your browser, what happens now? This is where things get a little interesting and a lot of chatter starts to happen between systems locally and out on the web.

First your local DNS server be it the gateway as in a home network or an actual DNS server on the local network will query a DNS server it has in a list of contacts for just such occasion we call this server authoritative as it is viewed as a reliable authority for the hostname resolution. The server gets a reply possibly like this from its listed DNS contact: “I know where [.] is but not [microsoft.com] , here is the address for [.]”

Map of the various physical root name servers. -Courtesy of Patrik Fältström
Map of the various physical root name servers.
-Courtesy of Patrik Fältström

Now this in the extreme as the [.] in a URL does represent an actual authoritative server. We call this server a Root name server. Many believe that there are only 13 root name servers as explained by Kim Davies on the ICANN Blog, this is a myth.

There is a technical design limitation that means thirteen is a practical maximum to the number of named authorities in the delegation data for the root zone. These named authorities are listed alphabetically, from a.root-servers.net through m.root-servers.net. Each has associated with it an IP address…

The majority of named authorities are spread across multiple cities, often multiple countries…

every single root server is a copy, and none of them are more special than the others. In fact, the true master server from which the copies are made is not one of the public root servers.

The root name server will give the requesting server now the IP for the [.com] server which just like the root server there are many world wide. From here your DNS server now contacts the [.com] server for the IP of microsoft.com which if registered through the domain name registration authority an IP address will be returned to your DNS server which then will record it in its host file then pass the address on to your computer sitting on your desk that your are gazing intently at now.

This all happens at the speed of light, well really the “speed of copper” for electrons do flow a little slower through copper and much of the internet is cabled with copper. Still pretty amazing that all this chatter happens as fast as it does to deliver content to you at your desk, living room TV, or even some phone systems known as Voice over IP (VoIP).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s