What is DNS and How it Works?


Before start to Install and Configure DNS you need to understand how DNS work.

What is DNS? The sort meaning is DNS resolves an IP address to a hostname. DNS stands for Domain Name Server or Domain Name System.

It means that It mapped names to specify network addresses. Basically, DNS a large database that resides on various computers that contains the names and IP addresses of various hosts/domains. Other than IP address DNS also associates various information with the domain names.

DNS stands for Domain Name Service. It is an internet service that maps IP addresses to FQDNS that we called fully qualified domain names.


Figure 1


In this tutorial, I’ll explore some background material necessary to your understanding of the installation and configuration of a DNS server and client. Generally, You probably type in your browser address bar to www.google.com, and then it appears to you with the website of Google Company, right? Actually, This server is provided the IP address and mapped with the Name (hostname). If we breakdown we will see like Figure 2.

Figure 2

The Root Domain

The Root (.) domain name is silently assumed to be present even though it is not explicitly written. You never type it during the web address. Because it was hidden and don't need you to type it. Normally, the web address of www.google.com, but in the DNS it is www.google.com. (likewise). 

The Top Level Domains are divided into 2 categories:

  • Generic TLD (gTLD)
  • Country Code TLD (ccTLD)
The tree structure of DNS, as shown in Figure 2.
Figure 3

The Second-Level Domain Names

The names in this level of the DNS make up the actual organizational boundary of the namespace. Companies, Internet service providers (ISPs), educational communities, nonprofit groups, and individuals typically acquire unique names within this level. Here are a few examples: redhat.com, ubuntu.com, kernel.org, and reanlinux.com. The second-level domain in our sample FQDN (server1.example.org.) is “example.”

The Third-Level Domain Names

The third level domain names to hostnames or other functional uses. It also called a subdomain. Example www.google.com. www here is the under of google that is the actual hostname of a machine. It can be an alias to a real hostname.

We use the third level because we want to make it an individual site. let's follow the path of a DNS request:
  1. A client to visit a web site called "www.support.example.com."
  2. The query starts with the top-level domain "com." within "com." is "example.com."
  3. Let's look at the authoritative DNS server for the "example.com" is named "ns.example.com."
  4. Hostname ns is authoritative for the example.com domain, we have to query it for all hosts (subdomains) under it.
  5. The query is for information about the host we are interested in: "www.server1.example.com."
  6. ns.example.com's DNS configure is such that for any ending a "server1.example.com" the server must contact another authoritative server called "dns2.example.com."
  7. The request for "www.server1.example.com" is then passed on to dns2.example.com, which returns the IP address for www.server1.example.com say, 192.168.1.10.
Type of Servers

DNS servers have three classifieds are Primary, Secondary, and caching. 

The primary Server is the server that contains the configuration file and is considered authoritative for a particular domain. When updates to the domain’s DNS tables occur, they are done on this server. A primary name server for a domain is simply a DNS server that knows about all hosts and subdomains existing under its domain.

The secondary Server is working as backups and as load distributors for the primary name servers. Primary servers know of the existence of secondaries and send them periodic
notifications/alerts of changes to the name tables. 

Caching Server is the server that does not store the configuration files for any particular domain. When a client requests to resolve a name the server will check its own local cache first. If it cannot find a match, it will find the primary server and ask for it.



Previous Post Next Post

نموذج الاتصال