Signup/Sign In

DNS Protocol

In this tutorial, we will be covering the concepts of DNS in detail in Computer Networks.

DNS is an abbreviation of Domain Name System or Domain Name Service. It is an application layer protocol.

  • Basically, a Domain name system is a supporting program that is used by other programs such as an E-mail.

  • The user of the email program knows the email address of the recipient; the Internet protocol needs the IP address.

  • Mainly the DNS client program sends a request to the DNS server in order to map the e-mail address to the corresponding IP address.

  • In order to identify an entity, the TCP/IP protocols also make use of an IP address that uniquely identifies the connection of the host to the internet. But people usually prefer to use names instead of numeric addresses. Thus there is a need for the system that can map a name to an address or an address to a name.

Domain Name System is a system that can map a name to an address or an address to a name.


Given below is an example of using the Domain name system:

Name Space

NameSpace basically maps each address to a unique name. The names assigned to the machines must be unique because addresses are unique.

It is further categorized into two:

  • Flat Name Space

  • Hierarchical Name Space

Flat Name Space

In the Flat Name Space basically, a name is assigned to an address.

  • A name in this space is basically a sequence of characters without any structure.

  • Also, the names may or may not have a common section. In case if they have a common section then it has no meaning.

  • One of the main disadvantages of this system is that it cannot be used in the case of large systems; because there is no central control and it will lead to ambiguity and duplication.

Hierarchical Name Space

In Hierarchical Name Space each name consists of several parts.

  • The first part mainly indicates the nature of the organization.

  • The second part mainly indicates the name of the organization.

  • The third part mainly defines the departments in the organization and so on.

  • The central authority can assign the part of the name that indicates the name and nature of the organization and the responsibility of the rest of the name is given to the organization itself.

  • An organization can also add suffixes(or prefixes) to the name in order to define the host or resources.

Domain Name Space

When we use the hierarchical Name Space in that case we need to design the Domain Name Space.In this Design, the names are defined in the inverted-tree structure where the root lies at the top.

Also, the tree can have 128 levels and these are from Level 0(root) to Level 127.


Each node of the tree must have a label. A Label is a string having a maximum of 63 characters.

  • The root label is basically a null string(means an empty string).

  • Domain Name Space requires that the children of the node that means branches from the same node should have different labels and this guarantees the uniqueness of the domain names.

Domain Name

Each node of the tree has a domain name.

  • A Full domain name is basically a sequence of labels that are usually separated by dots(.).

  • The domain name is always read from the node up to the root.

  • The last label is the label of the root that is always null.

  • All this means that the full domain name always ends in the null label, which means that the last character is always a dot because the null string is nothing.

The figure shows the domain names and labels

Domain Names are further categorized into two:

1. Fully Qualified Domain Name

  • If the label is terminated by the null string then it is known as a fully qualified domain name. This domain name contains the full name of the host.

  • FQDN mainly consists of two parts: hostname and domain name.

  • The FQDN mainly contains all the labels from the most specific one to the most general one that helps to uniquely define the name of the host.

  • in this the hostname is Champion.

Given below are some Fully Qualified Domain names;

2.Partially Qualified Domain Name

If the label is not terminated by the null string then it is known as Partially Qualified Domain Name.

  • This name starts from the node but does not reach the root.

  • It is mainly used when the name to be resolved belongs to the same site as the client and in this case, the resolver can supply the missing part that is known as a suffix in order to create an FQDN.


A Domain is basically the subtree of the Domain Name Space. The name of the domain is usually the domain name of the node that is at the top of the subtree.

About the author:
Aspiring Software developer working as a content writer. I like computer related subjects like Computer Networks, Operating system, CAO, Database, and I am also learning Python.