Uncategorized

What is DNS and How Does It Work?

In this tutorial, we are going to see What is DNS and how does It work? Any computer directly connected to the Internet has at least one IP address assigned to it. However, users do not want to work with numerical addresses such as 194.153.205.26 but with a domain name or more explicit addresses (called FQDN addresses) such as www.stackhowto.com.

Thus, it is possible to associate names in everyday language with numerical addresses thanks to a system called DNS (Domain Name System).

The association between IP addresses and the associated domain name is called domain name resolution (or address resolution).

 

 

Host names:

In the very beginning of TCP/IP, because networks were very small, or rather the number of computers connected to a single network was small, network administrators created files called manual lookup tables. These manual lookup tables were sequential files, usually named hosts or hosts.txt, which combine on each line the IP address of the machine and the associated name, called the hostname.
 

What is DNS (Domain Name System)?

However, the previous system of conversion tables required manual updating of the tables of all computers when a machine name was added or modified. Thus, with the explosion in the size of networks, and their interconnection, it was necessary to set up a hierarchical and more easily manageable. The Domain Name System (DNS) was developed in November 1983 by Paul Mockapetris (RFC 882 and RFC 883), then revised in 1987 in RFCs 1034 and 1035. The DNS has been the subject of many RFCs since then.

This system offers :

  • a hierarchical namespace allowing to guarantee the uniqueness of a name in a tree structure, in the same way as Unix file systems.
  • a system of distributed servers to make the namespace available.
  • a system of clients allowing to “resolve” the domain names, i.e. to query the servers in order to know the IP address corresponding to a name.

The structure of the DNS system is based on a tree structure in which top-level domains (called TLDs) are defined, attached to a root node represented by a dot.
 


Image source: www.wikimedia.org

 
 
Each node in the tree is called a “domain name”. Each node has a label with a maximum length of 63 characters.

The set of domain names thus constitutes a reversed tree where each node is separated from the next by a dot (“. “).

The end of a branch is called a host and corresponds to a machine or a network entity. The hostname assigned to it must be unique in the domain considered, or if necessary in the sub-domain. For example, the webserver of a domain generally has the name www.

The word “domain” formally corresponds to the suffix of a domain name, i.e. all the node labels of a tree, except for the host.

The absolute name corresponding to the set of node labels in a tree, separated by dots, and ending with a period, is called a Fully Qualified Domain Name (FQDN) address. The maximum depth of the tree is 127 levels and the maximum length of an FQDN is 255 characters. The FQDN address is used to uniquely identify a machine on the network. Thus www.stackhowto.com. represents an FQDN address.
 

Name servers

The machines called Domain Name Servers are used to establish the correspondence between the domain name and the IP address of the machines on a network.
 


 
 
Each domain has a domain name server, called the primary domain name server, as well as a secondary domain name server, which can take over from the primary name server if it is unavailable.
 

Image source: www.wikimedia.org

 
Each name server is declared in a domain name server of the level immediately above, which implicitly allows a delegation of authority over the domains. The domain name system is a distributed architecture, where each entity is responsible for the management of its domain name. There is therefore no single organization responsible for managing all domain names.
 
 

Top Level Domains

There are two categories of TLDs (Top Level Domain):

  • The so-called “generic” domains, called gTLDs (generic TLDs). The gTLDs are generic top-level domain names that offer a classification according to the sector of activity. Each gTLD has its own access rules:
    • .com initially corresponded to companies with a commercial vocation. From now on, this TLD has become the “default TLD” and the acquisition of domains with this extension is possible, including by individuals.
    • .edu corresponds to educational organizations;
    • .gov corresponds to governmental organizations;
  • The so-called “national” domains, called ccTLD (country code TLD). The ccTLDs correspond to the different countries and their names correspond to the abbreviations of the country names defined by the ISO 3166 standard.
    • .US: United State
    • .UK United Kingdom
    • .MA Morocco

 
mcq-networking-question-answerComputer Network MCQ – Questions and Answers – Part 1Networking MCQs questions with answers to prepare for exams, tests, and certifications. These questions are taken from a real written exam and some parts are…Read More

Leave a Reply

Your email address will not be published. Required fields are marked *