Friday, April 19, 2024
HomeTutorialDNS TutorialWhat is DNS and its Type - DNS Tutorial

What is DNS and its Type – DNS Tutorial

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:

Master:

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:

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

Catching-only:

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.

Forwarding

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.

Packages:

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:

Bind-chroot

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

Bind-devel

Includes development libraries from bind.

Bind-libbind-devel:

Contains the libbind resolve library.

Bind-libs

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

Bind-sdb

Supports alternative databases for bind.

Bind-utils:

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

DNS CLIENT:

/etc/nsswitch.conf

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

Hosts:files,dns

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

/etc/hosts

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
127.0.0.1 localhost.localdomain localhost
192.168.1.1. foxutech.com server

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

/etc/resolve.conf

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
Nameserver 192.168.1.1

In this case all DNS queried launched from the computer will be addressed to the nameserver on 192.168.1.1. 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.

RELATED ARTICLES
- Advertisment -

Most Popular

Recent Comments