How Does DNS Work?

November 1st, 2008 | by Conrad Walton |

The Internet is a bunch of computers that all send little packets of data back and forth between each other. The computer that you are reading this on is one of them.

Each computer must have some sort of identifier so that it knows where to send the data to and so that other computer knows where to send it back to. These identifiers are called “IP Addresses”. IP stands for “Internet Protocol”. The address itself looks like this: 63.74.159.145. I’m sure you’ve seen something like that somewhere before.

But when you want a web page, you don’t tell your web browser to go get data from an IP address. You use a “domain name”, like “www.google.com” or “www.walton.com”. That domain name needs to be “resolved”. It’s got to be translated into an IP address so the data knows where to go. That all happens behind the scenes.

I’ll go through all the steps that happen so you’ll know what you need to do to get your own domain name set up without being taken advantage up by low life registrars. More about them later.

When you type in a domain name into your browser and hit enter, your computer goes and asks another server, called a “DNS” or “Domain Name Server” what the IP address is for that domain name. When your computer knows the IP address, it sends off the request and receives that answer back. In this case, the request is for a file that creates the web page in your browser.

Before I go farther, two terms you need to know are “client” and “server”. Each is a computer that can talk to other computers. The difference is that a “client” sends a request, while a “server” responds to requests. One asks and the other answers. Any computer can be either, or both, a client and a server.

Web pages are only one type of request, but probably the most common type. There are time servers that only respond with the time. There are Instant Message servers that sit between two people and send IMs to each of them as they are received. DNS responds to domain names with IP addresses.

So how does that DNS know what IP address is correct? From the “Root Servers”, of course! (No, they don’t serve roots.) There are 13 root servers that contain all of the information for each domain name that has been registered. Yes, they are pretty critical.

When a request for a domain name is received by a root server, it only knows which DNS to go ask for the IP address. DNS servers (Yes, the S is redundant, but who wants to call them “DN servers”?) are also called “name servers”.

Too many technical names? I think I got them all out so I can stop now.

The DNS are located all over. Anyone can have one. I have one here. Anyone can provide the service for you if you really wanted. Now, the DNS manages the relationship between the domain name and the IP address. Root servers know which DNS to ask and the DNS knows the IP. There are local DNS for each computer that needs to look up stuff. There are DNS that have authority over specific domain names.

The root servers get their information from “domain name registrars”. (That’s not really a technical name, so it doesn’t count.) You’ll hear people talking about their “registrar”. GoDaddy.com is one. Networksolutions.com is also one, but they are evil, so NEVER, EVER use them for anything. Did I mention that before?

A registrar will charge you some money per year to register your name. They usually provide a web interface so that you can manage what the name servers are for that domain name. They might provide the DNS for you and they’ll let you manage that too. The strength of that interface and what it will allow you to do is very important.

So, to review, you type in a domain name into your web browser. Your web browser asks the local DNS what the IP address is. If the local DNS doesn’t know, it asks the Root Server, which then tells it which DNS has authority for that name. Your local DNS then asks the DNS with authority, which then responds with the correct IP address. The web browser then sends off the web page request to the proper web server to get the web page.

All of that happens in the blink of an eye, which is a technical term for “under 200 milliseconds”.

Please Comment »

Tags: , , , , , ,

Leave a Reply