Domain Name System in Computer Network

Although network communication can only be done by knowing the receiver’s IP address. It is very hard to remember the IP address of thousand of hosts. It would be very useful if the receiver is accessible by a name consisting of strings of ASCII characters that are called Domain Name System (DNS).

DNS Contains 5 important resources:
1. Name Space
2. Resource Records
3. Name Server
4. Name-Address Resolution
5. Resolver

Name Space:

Internet consists of more than 200 Top Level Domains. Each domain consists of sub-domains and these sub-domains are again partitioned ultimately consisting of several hosts. The domains can be represented in terms of an inverted tree. The leaves represent domains that have no subdomain. A leaf may contain a single host or a group of hosts. Top Level Domains are of two types:
i. Generic Domains
ii. Country Domains

Generic Domains:

  • com (commercial)
  • edu (educational)
  • gov (govt.)
  • net (network provider)
  • org (organization)
  • biz (business)
  • info (information)
  • int (international)
  • mil (military)

Country Domains:

  • .in (India)
  • .us (United States of America)
  • .uk (United Kingdom)
  • .au (Australia)
  • .br (Brazil)
  • .jp (Japan)
  • .pk (Pakistan)
  • .bd (Bangladesh)

Resource Records:

Each domain has a set of resource records. DNS on getting the domain name returns the resource record associated with it. The resource record contains five fields stored in a binary-encoded format, the ASCII representation is given below:
Domain_name  Time_to_live  Class  Type  Value

Domain_name: It indicates the domain to which the record applies. This is the primary search key used to satisfy queries.
Time_to_live: This field tells about the stability of the record. For most stable records high value is stored. For the highly volatile record, a small value is assigned to it. It indicates the life of the record in the cache of a remote machine.
Class: It refers to whether the record contains internet information or non-internet information. For internet information, its value is IN.
The type field tells what kind of record it is.
Value: This field can be a number or a domain name or ASCII starting depending on the record type

Name Server:

A name server contains DNS database and responds to all queries against domain name. A centralized DNS database stored in a single name server would overload it. It also in case of failure of it the entire internet service would be disrupted.

Name-Address Resolution:

Mapping of DNS name to its corresponding IP address or an IP address to its name is known as Name-Address Resolution. This resolution is the prime factor of DNS. For this resolution to be done we require a resolver.


DNS is basically a client-server application. A host required to map a name to an address or an address to a name has to run a DNS client program known as Resolver. The resolver generates a query to the local name server for the name or address. In case it gets the result from the server it delivers the result to the process that is requested for the query. In case the server fails to get the result it sends the address of the next possible service that can give the result. In this case, the resolver generates a new query to this new server. Depending on the query method there are two possible types of resolution.