Posted By Ulisses Gurgel

Understanding DNS

Date
Jan 26

0

Do you like this story?

There are many who would disdain the entire concept of domain names. “Why not just remember the IP addresses of all your favorite web locations?”, they ask. This is not an impertinent query, nor one we should overlook in our discussion about Domain Name Systems.

Let’s look at some facts:

  1. The average person can only hold about seven numbers in their mind at a time, give or take a couple.
  2. An IPv4 address is, at its longest, 12 digits long.

You can see that 7 < 12. This is incidentally why pin numbers are only 4 digits long.

Your next question is likely to be, “Why not just write them down?”. Aha! That’s exactly what I wanted you to ask. Imagine you go to some kind of conference. You meet tons of people there, each of whom gives you their IP address for later perusal. This would be an intimidating list of numbers, would it not? As a sane human being, you would probably give each number some manner of label for later identification. Something like this:

  • 196.78.23.214 - Hammermound Ltd.
  • 90.211.74.32 - FriendlyFacesInc

Makes sense, right? This is essentially a computer readable to human readable format exchange. It’s important to understand that we do this purely because of our human shortcomings, and no other reason. IP addresses (well, not IPv4 so much anymore) are already unique, and thus need no label. Since we don’t handle numbers well, we need this translation, but it’s completely superfluous to the actual underlying TCP/IP system. So, in order to accomodate our innate lack of numerical abilities, the Domain Name System was born.

DNS is basically a giant dictionary of entries telling computers what unique aliases we have come up with for perfectly good numbers. Say, for example, you type in “ilovecats.com” into your browser. Since your computer has no idea what that string of letters means, it must look into its own dictionary to see if it can translate “ilovecats.com” into the purity that is numbers. Most likely, unless you go to “ilovecats.com” very often, your computer will not be able to find a definition. It must then seek help from a higher entity (most likely your router), who may or may not know it as well. This happens quite a few times until you get to the infallible word of the 13 root DNS servers, which must be correct, for that is the core of the system.

Whenever you register a new domain name, the definition of 127.56.32.112 -> insertname.com goes to these 13 servers first, and then cascades down into the masses of routers and eventually to your computer. As soon as one of these computers (or nodes, as they are called) learns a new definition, it will keep it in its internal dictionary (the cache) for a predetermined amount of time. It cannot keep it forever because sometimes things change.
When the cache expires, these routers must check the routers above them (or the 13 root servers) for all the new definitions. If you’ve recently changed your domain name to point to a different IP address, these routers -- whose caches have expired --  will now have the new definition for your domain name in their dictionaries. Then the router below that router must have its cache expired before it contains the new definition.

This is why it takes 24 - 48 hours for the whole Internet to know about your domain name change. You must wait for all caches between your computer and the 13 root nodes to expire and contain the updated information about your domain before your computer knows about it.

Ulisses Gurgel

Ulisses Gurgel is a web engineer at VisionPoint Marketing. His interests lean toward understanding the technical underbelly of the web and applying that knowledge to his everyday work.

Category

Web Technology

Tags











More Posts

Subscribe

© Copyright 2001- 2011 VisionPoint Marketing - 919.848.2018
2443 Lynn Rd, Suite 108, Raleigh NC 27612