Internet DNS – An Introduction

Posted by brian | Posted in DNS, Web Hosting | Posted on 19-12-2008

0

DNS is ubiquitous on the Internet, yet it is often misunderstood and remains a mystery to most people. As a hosting provider we administer and troubleshoot DNS issues several times per day, if not several times per hour; so we thought it would be fun and educational to write up a series of posts regarding DNS.  We’ll toss in a few tidbits and techniques of troubleshooting it, for kicks.  So without further ado!

DNS In a Nutshell

The Domain Name System (DNS) is simply a Internet-wide database for associating friendly domain names (example.com) to an IP addresses (1.2.3.4). Over time, other functions such as Domain Keys and SPF for Spam prevention have burdened DNS with a few more responsibilities–but none have fundamentally changed its primary purpose or how the system works.

The Players

To understand the DNS process one must understand the parts involved, and fortunately DNS only has a few.  On the Internet, the DNS system can most generally be segmented into three major parts:

  1. Your computer.
  2. The Root DNS Servers.
  3. All other DNS Servers.

A few important things regarding domain names you should know…

  1. The period, or “dot” in domain names is a symbolic character representing a change of authority.  For instance, one server may be responsible for the DNS database containing tlfhosting.com., and yet another might be responsible for linuxrocks.tlfhosting.com. Each time a period is seen by your computer, it knows it has to ask a server for more information.   It could be the same server, or a different one–but it is required to ask nonetheless.
  2. Your computer actually “reads” domain names from right-to-left (backwards of how english is read).  Why?  It’s simply trade-off between readability by people and a logical hierarchy that computers need.   Things wouldn’t make much sense to people if we typed .com.tlfhosting.www after all.  It just looks strange, because we read things from left to right.   Yet because of how DNS is structured, your computer needs to read it that way.
  3. Every domain name actually has a trailing period.  Notice how we’ve been typing “tlfhosting.com.”?  That’s actually the correct way to type it.  In fact, open a new window in your browser and type www.thelinuxfix.com. (with the trailing period).  Next try www.google.com., or any other domain for that matter.  Normally it isn’t needed, but only becase most software ‘types’ the trailing period for you automatically.  But why the trailing period?  Think of it in context of items #1 and #2 above, and it begins to make sense.

Let’s take a quick look at one of our own second-level domains (we’ll help explain that term in a moment): tlfhosting.com.   Let’s say you’d like to connect to www.tlfhosting.com. to do something–could be a website, telnet, FTP, or anything.  The important point is that to do anything your computer first needs the IP address of www.tlfhosting.com., since it cannot do a single thing with english words!

The Root Servers and TLDs

To get things started, we’ll have to talk about that all-important trailing dot on “www.tlfhosting.com.

Remember point #2 above.  The first thing your computer sees when trying to translate the domain name is a period (.).  Because of that, it knows a domain is coming next so it will need to ask a DNS server about it.

But wait, which server?  How is it supposed to know where to look if it’s just getting started?

This is where the Root Servers come in.   The Root Servers are represented by the trailing period (.) in google.com. and tlfhosting.com., or any domain for that matter.

As you’ve probably figured out, the Root Servers are then responsible for all top-level-domains (or “TLDs”), such as “net.”, “org.”, “edu.”, and so forth.  They’re called top-level simply because all other domains (like tlfhosting) are under their authority.   So these things are not only busy–they’re very, very important to the operation of the entire Internet!

The Root Servers don’t change much at all.  In fact, most computers are already hard-wired in a programming sense to know who to ask about “com”, “net”, or any of the other TLDs.  In fact, every computer that asks something about any domain name on the Internet at some point or another asked the Root Servers a question. As you can imagine, these are busy little servers.

Now hopefully the term “Second-Level-Domain” should begin to make more sense as well.   If “.com” is a top-level domain, then logically tlfhosting.com is a second-level domain, and thus subdomain.tlfhosting.com would be a third-level domain.  It just goes right-to-left as we were talking about.  Easy as pie!

Keep an eye out for part 2, where we’ll discuss the exact process a computer follows to determine the IP address of any domain.