Internet Safety Lesson – How does the Internet Work?

Internet Safety :: A Paren’ts GuideWhen I teach class, especially to beginners or when I’m talking with parents about Internet Safety, a question I’m often asked is “How does the Internet actually work?” Well, in reality it’s obviously a complex topic, but we can certainly break it down into familiar terms. When you type in a web address, like www.palaestratraining.com, your computer actually does some work behind the scenes to translate that human readable name into an IP address. Just like if you wanted to call your friend Susy’s house, you would translate that (in your head probably) from her name into her telephone number, and you’d contact her by her telephone number.

Let’s use the concept of directory services (think of the yellow pages for your town). Let’s say there is a directory service for each city, for each state, and one master directory service for the whole country.

If I lived in New Jersey and wanted to find a pizza shop in southern California what would I do? Well, let’s pretend that I called information, or directory services, in New Jersey and asked them if they knew the number to Nick’s Pizza in Long Beach, California. After they got done laughing, they would say “No, but we do have the number to the main information office (the directory service for the whole country), check there.” So let’s continue along with this scenario and pretend there was a main directory service (yellow pages) that had all the phone numbers for all the smaller directory services (information offices) for each state in the US. I would call the big daddy of information services and ask them if they had the phone number for Nick’s Pizza in Long Beach, California. That main information office would say, “no, but the phone number for directory services in California is such and such, try there…”.

So, not being easily daunted, I would call that number and ask the same question, to which the main office for California would say, “We don’t have it either, but we do have the number for directory services in Long Beach, try there..” So I press onward. I call that information office and low and behold, since they were responsible for the numbers in that little part of the world, they would have the phone number for Nick’s Pizza. They would give me the number so I could finally get in touch with Nick’s Pizza, but since I forgot about the three hours difference in time zones, they weren’t open yet!

Seriously though, the Internet functions in very much the same way. The Internet doesn’t run of off “Directory Services” like we’re used to with the phone systems, but there is a directory services of sorts, and it is called the “Domain Name System” or DNS. DNS is made up of a top level server (the big daddy directory service in our example), and then lower level DNS servers, and so on. Each domain (i.e. palaestratraining.com or microsoft.com) has a DNS server that is responsible for the addresses within that name space. Just like directory services for Anytown, USA would have all the phone numbers for that town.

So in keeping with that example, DNS servers don’t maintain phone numbers, they keep IP addresses. The to DNS servers keep the IP addresses to lower level DNS servers and so on down the line. The DNS servers for each domain, keep the IP addresses for the servers in it’s domain.

Some of the top level domains you’re probably already familiar with , such as .com, .edu, .gov, .mil and so on. Below them are even lower level servers that handle even smaller pieces of the internet’s name space.

DNS Resolution
If we look at the graphic below, we’ll see that the following takes place for someone trying to access the website at www.palaestratraining.com:

DNS Resolution

  1. The web surfer’s machine makes a request to it’s configured DNS server, asking for the IP address of the website (i.e. www.palaestratraining.com)
  2. The DNS checks its cache (temporary memory of recently asked questions), realizes it doesn’t have the IP address and then makes another request on behalf of the web surfer to the “root” internet server, which is “.”
  3. The “.” Root server doesn’t have the IP address of www.palaestratraining.com, but it does have the IP address of the DNS servers that are authoritative for the COM domain, and refers the requesting DNS server there.
  4. The ISP’s DNS server then contacts the COM DNS server and again asks for the IP address of www.palaestratraining.com.
  5. The COM DNS server advises it doesn’t have the IP address, but it does have the IP address of the DNS server authoritative for the Palaestra Training domain, and refers the requestor there.
  6. The ISP’s DNS server then contacts the Palaestra Training DNS server and again asks for the IP of www.palaestratraining.com.
  7. The Palaestra Training DNS server checks it’s database and provides the ISP DNS server with the IP address of www.palaestratraining which is 64.27.85.132.
  8. The ISP’s DNS server returns the IP address of 64.27.85.132 to the web surfer’s machine.
  9. The web surfer’s machine then makes a connection to www.palaestratraining.com, requesting web services from the server hosting the website.
  10. Palaestratraining.com processes the request and sends the main page for www.palaestratraining.com which is then displayed in the web surfer’s browser

That seems like a lot of work just to get a web page! It’s even more impressive when you consider the fact that all of this usually takes place in a matter of seconds whether the web server is located across town or across the globe. As you might guess from the example above, DNS is not one giant database. It’s actually broken up into different parts, with the root of the internet at the top of the hierarchy. There are different DNS servers that handle the different portions of the internet such as .com, .net, .edu, .mil and so forth. That is really what makes DNS so fast is that a surfer can quickly be referred to a DNS server that handles the site they are looking for, otherwise it would take substantially longer (if it were even possible) to search through the more than 300 million web sites that currently exist.

So the next time you visit a website, take a moment to think about what’s actually happening behind the scenes, and thank you computer for all that hard work!

Leave a Reply

%d bloggers like this: