DNS

Feb 16
22:00

2002

Richard Lowe

Richard Lowe

  • Share this article on Facebook
  • Share this article on Twitter
  • Share this article on Linkedin

When you enter a web site address (a URL) into your ... bar (or click on a ... you actually set in motiona complex series of events. It sounds simple - the name must ...

mediaimage

When you enter a web site address (a URL) into your browser's
address bar (or click on a hyperlink),DNS Articles you actually set in motion
a complex series of events. It sounds simple - the name must be
translated into a TCP/IP address - but some real magic is
occurring under the covers of the internet.

You see, the internet uses a special number known as a TCP/IP
address to identify machines. Each and every machine on the
internet has one of these numbers. An example is 23.5.67.9 -
each of the four numbers is called an octet. Thus, the URL
www.internet-tips.net might actually translate to 23.5.67.9
using something called DNS.

Okay, before I go on any further with this explanation,
understand this article is a highly simplified description of a
process that is actually highly technical, extremely complex and
very difficult for even the experts to totally understand. People
spend years in training learning how this all works.

When your machine needs to retrieve a URL (when you enter a web
site address in the browser address line, for example), it first
checks to see if it already knows how to translate the address.
Depending upon the operating system and browser, a number of
different steps might take place.

The first basic fact to understand is that TCP/IP has been
designed to attempt to reduce the expense (the time) it takes to
translate a name to a TCP/IP number. This translation is
potentially extremely time consuming, and users don't like to
wait. So a number of intermediate steps have been added to
attempt to speed things up.

First your system looks to see if it already has done the
translation recently (this is called caching). What happens is
each time your computer successfully performs a translate it
makes a note of the results off to the side. Later, if you enter
the same URL, the system looks on it's list, finds it already has
the address and returns that value.

If your system has not translated the URL before, it might check
the LMHOSTS or HOSTS files (these are just text files used to aid
in translating host names to TCP/IP addresses) and perhaps other
things as well. Note that if the address has been cached, it
might be refreshed (retrieved from the internet again) if it is
too old (perhaps the address was translated a few days ago). The
HOSTS and LMHOSTS files are never refreshed - they are assumed to
be correct.

Now the system has no choice except to look outside to the
internet to try and translate the URL. So your system will send a
translation request out to your primary DNS server. This is
usually supplied to you by your ISP when you installed your
computer on the internet. If the primary DNS server cannot be
reached for some reason, then the secondary DNS server will be
queried.

Okay, now it gets a little more complicated so we will work with
an example. Assume the address "www.internet-tips.net". A name
server may or may not (depending upon what type of name server
and how it is configured) remember addresses that have been
requested before. If they remember, then they will simply return
the translation directly back to your computer.

Most likely, though, the primary DNS does not know how to
translate the hostname, so it will go out and ask some other
name servers. It will start with the root domain (.NET in our
example) and ask it if it knows how to translate "internet-tips".
The .NET name server may or may not know. So it will either say
"sure, here's the address" or "no, I don't know, but here are the
addresses of some other name servers in .NET that may know."
These servers will be asked, and will perform the same actions.
This will continue until there is no where to turn for the answer
(there is no resolution) or the translation is found.

Once the name server who knows the address of "internet-tips" is
found, it will be asked if it knows the address of the "www". It
will either return the address (this is very likely) or return
the name(s) of name servers that might know the answer themselves.

Now that the name server (primary or secondary) as the actual
TCP/IP address it sends it back to your machine.

I hope that helps explain, just a little, how the magic really
works under the covers.