DNS and Name Resolution

We know that each computer on the Internet has its own IP address. Although this is sufficient to identify a computer for purposes of transmitting packets, it is not particularly accommodating to people. Also, if a computer were to be relocated we would like to still identify it by the same name.
Hence each computer is given a descriptive textual name. The basic textual name of a machine is called the unqualified-hostname31.1 and is usually less than eight characters and contains only lowercase letters and numbers (and especially no dots). Groups of computers have a domainname. The full name of machine is unqualified-hostname.domainname and is called the fully qualified hostname31.2or the qualified-hostname31.3 For example, my computer is cericon. The domainname of my company is obsidian.co.za, and hence the qualified-hostname of my computer is cericon.obsidian.co.za, although the IP address might be
Often the word domain usally is synonymous with domainname, and the word hostname on its own can mean either the qualified or unqualified hostname.
This system of naming computers is called the Domain Name System (DNS)

Top Level Domains (TLD's)
Domain's always end in a standard set of things. Here is a complete list of things that the last bit of a domain can be:

.com A US or international company proper. In fact, any organisation might have a .com domain.
.gov A US government organisation.
.edu A US university.
.mil A US military department.
.int An organisation established by international treaties.
.org A US or non-profit organisation. In fact, anyone can have a .org domain.
.net An Internet service providor. In fact, any bandwidth reseller, IT company or any company at all might have a .net domain.

Besides the above, the domain could end in a two letter country code.

Within each country, a domain may have things before it for better description. Each country may implement a different structure. Some examples are:

.co.za A South African company. (za = Zuid Afrika, for the old Dutch postal codes.)
.org.za A South African non-profit organisation.
.ac.za A South African academic university.
.edu.au An australian tertiary educational institution.
.gov.za A South African government organisation.

Note that a South African company might choose a .com domain or a .co.za domain. In our case we use obsidian.co.za. The same applies everywhere, so there is no hard and fast rule to locate an organisation from its domain.

Resolving DNS names to IP addresses :

In practice, a user will type a hostname (say www.obsidian.co.za) into some application like a web browser. The application has to then try find the IP address associated with that name, in order to send packets to it. This section describes the query structure used on the Internet so that everyone can find out anyone else's IP address.
An obvious way to do this is to distribute a long table of hostname vs. IP numbers to every machine on the Internet. But as soon as you have more than a few thousand machines, this becomes impossible.
Another obvious way to do this is to have one huge computer on the Internet somewhere who's IP address is known by everyone. This computer would be responsible for servicing requests for IP numbers, and the said application running on your local machine would just query this big machine. Of course with their being billions of machines out their, this will obviously create far too much network traffic.
The DNS structure on the Internet actually works like this:
There are computers that service requests for IP numbers -- millions of them. They are called name servers (or DNS servers), and a request is called a DNS lookup. However, each name server only has information about a specific part of the Internet, and they constantly query each other.

There are 13 root name servers on the Internet:


Each country also has a name server, and in turn each organisation has a name server. Each name server only has information about machines in its own domain, as well as information about other name servers. The root name servers only have information on the IP addresses of the name servers of .com, .edu, .za etc. The .za name server only has information on the IP addresses of the name servers of .org.za, .ac.za, .co.za etc. The .co.za name server only has information on the name servers of all South African companies, like .obsidian.co.za, .icon.co.za, .mweb.co.za, etc. The .obsidian.co.za, name server only has info on the machines at Obsidian Systems, like www.obsidian.co.za.
Your own machine will have a name server defined in its configuration files that is geographically close to it. The responsibility of this name server will be to directly answer any queries about its own domain that it has information about, and also to answer any other queries by querying as many other name servers on the Internet as is necessary.
Now our application is presented with www.obsidian.co.za. The following sequence of lookups take place to resolve this name into an IP address. This procedure is called hostname resolution and the algorithm that performs this operation is called the resolver.

1. The application will check certain special databases on the local machine. If it can get an answer directly from these, it proceeds no further.
2. The application will look up a geographically close name server from the local machines configuration file. Lets say this machine is called ns.
3. The application will query ns with ``www.obsidian.co.za?''.
4. ns will decide if that IP has been recently looked up before. If it has, there is no need to ask further, since the result would be stored in a local cache.
5. ns will see if the domain is local. I.e. if it is a computer that it has direct information about. In this case this would only be true if the ns were Obsidian's very own name server.
6. ns will strip out the TLD (Top Level Domain) .za It will query a root name server, asking what name server is responsible for .za The answer will be ucthpx.uct.ac.za of IP address
7. ns will strip out the next highest domain co.za It will query, asking what name server is responsible for co.za The answer will be secdns1.posix.co.za of IP address
8. ns will strip out the next highest domain obsidian.co.za It will query, asking what name server is responsible for obsidian.co.za The answer will be lava.obsidian.co.za of IP address
9. ns will query asking what the IP address is of www.obsidian.co.za The answer will be
10. ns will return the result to the application.
11. ns will store each of these results in a local cache with an expiry date. To avoid having to look them up a second time.

Thus the basics of DNS ends.

Related Posts :

Bookmark and Share