Sie sind auf Seite 1von 15

Understanding DNS :

DNS stands for Domain Name System.


DNS resolves name to ip and ip to name.

In the network every nodes or system uses ip address for communication.


If there less numbers of system in the network you can easily remember those
system's ip address, but If there is many numbers of system in the network
it is very difficult to remember all the system's ip address, Where DNS overcome
this issue. DNS maps the name to ip and also maps ip to name. When you communicate
using domainname DNS server will resolve that name and it will provide the
corresponding ip address for the communication.

For better understanding let us imagine mobile contacts, where we save mobile
number along with name we can't remember all the contact number, so that whenever
we want to communicate to that concern person we can easily find the number by
searching their name because.

For example, when you type www. google.com on the browser, by using this name
you can't communicate with google server and you can't get google page on your
browser.
Where DNS take care of name resolving, once you type the domainname on the address
bar,
your DNS request will check the DNS server and DNS server will reply with the
corresponding google ip address and then only your (www.google.com) request will
reach google server then you will get google page on your browser.

Configuring DNS:

Step 1: Chech pachages (bind, bind-utils, bind-chroot, caching-nameserver)

# rpm -qa bind* // To check whether


pachages installed or not
# rpm -qa caching-nameserver* // To check whether pachage
installed or not
# rpm -ivh bind // To install pachage
# rpm -ivh bind-utils // To install pachage
# rpm -ivh bind-chroot // To install pachage
# rpm -ivh caching-nameserver // To install pachage

Step 2: Verify whether pachages installed or not

# rpm -qa bind* // To check whether


pachages installed or not
# rpm -qa caching-nameserver* // To check whether pachage
installed or not
Step 3: Chech the ip address and hostname

# inconfig // To check ip address


# hostname // To check hostname
server1.domain.c

Step 4: Change directory to /var/named/chroot/etc and


copy named.caching-nameserver.conf as named.conf

# cd /var/named/chroot/etc // To
change directory

# cp named.caching-nameserver.conf named.conf
// To copy named.caching-nameserver.conf as named.conf
Step 5: Open named.conf file in vi editer nad modify the file as given below.

# vi named.conf // To modify the file in vi editer


Step 6: Open named.rfc1912.zones file in vi editer nad modify the file as given below.

# vi named.rfc1912.zones // To modify the file in vi editer


Step 7: Change group of the named.conf file

# chgrp named named.conf // To change the group of the file


Step 8: Change directory to /var/named/chroot/var/named
and copy localhost.named as forward.zone and copy named.local as
reverse.zone

# cd /var/named/chroot/var/named // To change directory


# cp localhost.zone forward.zone // To copy localhost.zone as forward.zone

# cp named.local reverse.zone // To copy named.local as


reverse.zone
Step 9: Open forward.zone file in vi editer nad modify the file as given below.

# vi forward.zone // To modify the file in vi editer


Step 10: Open reverse.zone file in vi editer nad modify the file as given below.

# vi reverse.zone // To modify the file in vi editer

Step 11: Change group of the forward.zone and reverse.zone file

# chgrp named forward.zone // To change the group of the file

# chgrp named reverse.zone // To change the group of the file


Step 12: Restart the "named" service.

# service named restart // To restart the service

Step 13: Make an entry in /etc/hosts file.

# vi /etc/hosts // To make an entry for DNS


server
Step 14: Make an entry in /etc/resolve.conf file.

# vi /etc/resolve.conf // To make an entry for DNS


server

Step 15: Check name resolve.

# dig server1.domain.com // To check name resolve


Step 16: Check name resolve.

# dig -x 192.168.1.20 // To check ip resolve


Step 17: Check DNS resolving

# nslookup // To check resolving

Das könnte Ihnen auch gefallen