Domain name space was designed to have hierarchical name space. The domain names are inverted-tree structure from root to top. The trees only have 128 levels. Root is levels 0 and top has 127.

Labels: Each and every node in the tree has label. Label is having maximum length 63 characters. The root label is a null string. DNS require that children of a node have different labels, which guarantees the uniqueness of the domain names.

Domain Name: Each and every node in the tree has name called as domain name. The complete domain name is a sequence of labels of in the tree and separated by dots (.). Full domain name always ends with a null label.

FQDN (Fully qualified domain name)

If a label is terminated by a null string, then it will be called as FQDN. An FQDN is a domain name that contains the full name of a any host. It contains all labels, from the most specific to the most general, that uniquely define the name of the host.

PQDN (Partially qualified domain name)

If a label is not terminated by a null string, it is called a partially qualified domain name (PQDN). A PQDN starts from a note, but it does not reach the root. It is used when the name to be resolved belongs to the same site as the client. Here the resolver can supply the missing part, called the suffix, to create an FQDN.

Domain:

A domain is a subtree of the domain name space. The name of the domain is the domain name of the node at the top of the subtree. A domain can be itself divided into domains called as subdomain.

Hierarchy of the Name Servers:

Information of the domain name space must be stored somewhere. But it is not efficient to store all the information of the domain names on the single computer. As the amount of memory is very large and also responses to requests from all over the world to single computer makes very heavy load on the system.

The solution to these problems is to distribute the information among many computers over the world called as DNS servers. One simple way to do his is to divide the whole space into many domains based on the first level. In other words, we keep the root stand alone and create as many domains as there are first-level nodes. Because a domain created this way could be very large. DNS allows domains to be divided further into smaller domains (sub domains). Each server can be responsible for either a large of small domain. In other words, we have a hierarchy of servers in the same way that we have a hierarchy of names.

Zone:

Since the complete domain name hierarchy connote be sorted on a singe server, it is divided among many servers. We can define a zone as a contiguous part of the entire trace. The server makes a database called a zone file and keeps all the information for every node under that domain. However, if a server divides its domain into sub domains and delegates part of its authority to other server, domain and zone refer to different things. The information about the nodes in the sub domains is stored in the serves at the lower levels, with the original server keeping some sort of reference to these lower-level servers. Of course the original serer does not free itself from responsibility totally: It still has a zone, but the detailed information is kept by the lower-level servers.

As server can also divide part of its domain and delegate responsibility but still keep part of the domain for itself. In this case, its zone is made of detailed information of the part of the domain that is not delegated and references to those parts that are delegated.

Root server:

Root server is a server having a zone file containing whole tree. A root server generally does not store any information about domains but shares its authority to other server, keeping references to those servers. There are several root servers, each converting the whole domain name space. The servers are distributed all around the world.

Primary and Secondary Servers:

There are two types of DNS. Primary domain name server and secondary domain name server. A primary server (NS1) is a server that store a file about the zone for which is an authority. The main task is to create, maintain and update zone file on the local disk. A secondary name server (NS2) is a server that transfer the complete information about the zone from another server and it is also stores the file on its local disk. The secondary is not creating or updating zone file. If any case updating is require, the task is done by the primary name server, which then sends updated version of zone file to secondary name server.

The NS1 (primary name server) and NS2 (secondary name server) are but authoritative for the zone they are having. Secondary name server is not the second level but to create redundancy of the data so that if one NS fails another works instead of another.

Following is a example of zone file :

$TTL 60

@       IN      SOA     ns.yourdomain.com. support.provider.com.(

1195721578      ; Serial

10800   ; Refresh

3600    ; Retry

604800  ; Expire

86400)  ; Minimum

yourdomain.com.      IN      NS              ns. yourdomain.com.

ns. yourdomain.com.   IN      A               71.95.94.22

yourdomain.com.      IN      A               71.95.94.22

webmail. yourdomain.com.      IN      A       71.95.94.22

mssql. yourdomain.com.        IN      A       71.95.94.22

sitebuilder. yourdomain.com.  IN      A       71.95.94.22

mail. yourdomain.com. IN      A               71.95.94.22

ftp. yourdomain.com.  IN      CNAME           yourdomain.com.

yourdomain.com.      IN      MX      10      mail. yourdomain.com.

www. yourdomain.com.  IN      CNAME           yourdomain.com.