What is DNS and its Type – DNS Tutorial

What is DNS and its Type

Domain name servers DNS or nameserver, maps device hostnames with their respective IP addresses. DNS is normally implemented using a central server/s that is authoritative for a domain and refer to other DNS servers for other domains. There are four DNS server configuration types:


It has the authoritative zone records for the domain that acts as DNS server. Answers directly queries about the authoritative domain and forwards other domain queries to other DNS servers.


Slave DNS server acts as an authoritative DNS server getting the zone records from the DNS master server.


Catching-only DNS server is not authoritative for any zone, all queries are forwarded to other DNS servers if they are not stored in the DNS – cache Zone. Answer for all queries are cached in DNS-cache Zone for a time.


As caching-only DNS server, forwarding DNS server is not authoritative for any zone, all queries are forwarded to a specific list of nameserver.

A name server can be master for some zones, slave for others and offer forwarding to them.


On RHEL6 DNS is based on the named daemon which is installed on the bind package developed through the internet Source consortium and some additional packages:


Provides a isolated ‘chroot-jail’ which limit the access if DNS is compromised.


Includes development libraries from bind.


Contains the libbind resolve library.


Add library files used by the bind and bind-utils packages.


Supports alternative databases for bind.


Includes tools such dig that provides DNS information about an internet device.



When a linux computer looks for another computer IP it looks for the information in two files :/etc/hosts , /etc/resolve.conf

The order in which the files are consulted is configured on /etc/nsswitch.conf.

# cat /etc/nssswitch.conf


Search first on files (/etc/hosts) and then on dnd (/etc/resolve.conf).


The file is a simple database that relates a numeric IP with a hostname. It can be edited as a normal file with ‘vi’ command in order to add more information.

# cat/etc/hosts localhost.localdomain localhost foxutech.com server

The first line maps the IP to the hostnames localhost, short hostnames and localhost and localdomain, FQHN hostname. The second line maps the IP to server and foxutech.com hostname.


In order to configure a linux computer as a DNS client the file /etc/resolve.conf must be used

# cat /etc/resolv.conf
Search info.net

In this case all DNS queried launched from the computer will be addressed to the nameserver on If a short hostname is provided it will be complemented automatically with ‘com’ domain.

Note: By default, if a DNS query is done and can be answered from /etc/hosts the nameserver configured on /etc/resolv.conf is not consulted. Only the information obtained from /etc/hosts is taken as valid.

Find Here: How Does DNS Works

In Next post will see how to setup DNS.