Domain Name System
Suppose 22.214.171.124 is the IP address from which a company has web pages in the internet. Some problems arise. One problem is, it is hard to remember the IP address. Another problem is as follows. Suppose the company shifted its web server to another machine thereby changing the IP address, then it should inform all users about the change. Just try to imagine this with a company like google. So, there is a need to change this IP address remembering system. Hence, the hosts.txt file was introduced. In that file, names and IP addresses of all hosts are stored. Web pages can be accessed through the host names and host name doesn't change with IP address. This solved the problem partially but not completely because this system works only when number of hosts is in thousands. If the number of hosts is in millions or billions as it is now, the file becomes very larger and complex. Another problem is, there may be a conflict in names. Hence, the domain name system was introduced in 1983. Using the domain name system, a name is provided for a company etc,. like www.indiastudychannel.com so that it can be used to access their web pages rather than by using IP address. It uses a hierarchical scheme explained below.
DNS Name Space
Consider the postal system for example. It is mandatory to specify country, state, city, street, door in the letter. To transfer a set of letters, they are divided into groups based on country. Then, the groups will be divided further based on state and so on. This is an example of hierarchical system. A similar scheme is followed by the domain name system. This naming system is managed by ICANN (Internet Corporation for Assigned Names and Numbers) and it was created for this purpose in 1998. Internet is divided into 250 top level domains where each domain covers a large number of hosts and these domains are further divided into sub domains and so on (clearly similar to the postal system discussed above). These domain names as a whole are referred to as the domain name space. As the domain name system follows a hierarchical scheme, the domain name space can be represented in tree form also called as the domain name space tree. A portion of the domain name space tree is as follows.
In the image, domains are categorized as root domain, high level domains, secondary level domains and so on. They are like planet, country, state and so on respectively in the postal system. Here, root domain relates to all the hosts. The high level domains are also called top level domains. The high level domains are of two types. They are generic domains and country domains. Generic domains like com, org can be obtained via applications to ICANN. And country domains follow one domain for one country principle and introduced to allow host names in their corresponding regional languages. To get a secondary level domain, you should go to registrars appointed by ICANN and check whether the name you want is available or already reserved. Then, a small annual fee should be paid to the registrar to own the domain. This caused a problem. Some people reserved many domains for themselves and sold them to interesting parties for higher prices. This is called cyber squatting. Policies are being developed to refine the system. Some of the generic high level domains are as follows.
com : Commercial (started in 1985)
edu : Educational Institutions (started in 1985)
gov : Government (started in 1985)
int : International Organisations (started in 1988)
mil : Military (started in 1985)
net : Network Providers (started in 1985)
org : Nonprofit Organisations (started in 1985)
info : Informational (started in 2002)
jobs : Employment (started in 2005)
mobi : Mobile Devices (started in 2005)
Now, coming to the representation of resultant domain name i.e. combination of high level domain name, secondary level domain name and so on. It is the upward path to the root of the domain name space tree and components i.e. high level domain name, secondary level domain name etc., separated by dot operator rather than the slash operator which leads to UNIX representation. For example, cs.washington.edu represents Computer Science department in University of Washington. In this way, the names we now use google.com, yahoo.com etc., are introduced.
Domain Resource Records
Any domain whether a single host or root domain has a set of resource records associated with it. These are called domain resource records. The domain name system maps domain names onto these records. A resource record is a five tuple. The general format of a domain resource record is mentioned below.
Domain_name Time_to_live Class Type Value
Domain_name represents the name of domain to which this resource record is mapped by the domain name system. Time_to_live represents the stability of a record i.e. its value is higher for highly stable records. Class is always IN for internet information but some codes are used for non internet information. Type and Value refers to the type and value of record respectively. Different types of resource records and their values are mentioned below.
SOA : Start of Authority (value is info about server's zone)
A : IPv4 address of a host (value is 32 bit address)
AAAA : IPv6 address of a host (value is 128 bit address)
MX : Mail Exchange (value is host willing to accept mail)
NS : Name Server (value is name server for domain or subdomain)
CNAME : Canonical Name (value is an alias name)
PTR : Pointer (value is an alias IP)
SPF : Sender Policy Framework (value is text encoding of mail sending policy)
SRV : Service (value is host providing this service)
TXT : Text (value is some descriptive ASCII text)
Name servers are the systems in which the domain resource records are saved. Suppose all the resource records are stored in one name server, entire internet gets shattered when a problem occurs to it. So, the resource records must be stored in different systems. Therefore, all the domains must be divided into non overlapping regions so that resource records of each such region can be stored in any name server. An image showing a sample division of domain name space into non overlapping regions is present below.
Each zone has one or more name servers which contain the resource records corresponding to that zone. These records may be authoritative records which come from authorities or cached records. In browsers, we enter the name (link to web page) and get the result. The process of looking up a name and finding its corresponding IP address is called name resolution. Now a days, a more flexible way is on demand which is to name the content and find nearest IP with that content.
This is a very good article explained. This article gives us the clear understanding on DNS which will be beneficial to students and also job seekers in networking field. I have also got the Domain Name System concept cleared.