INTRODUCTION TO DNS SERVER

 DNS provides the resolution of host names to IP &
  vice versa.
  . e.g www.wbut.ac.in to 192.168.43.10 (IPv4)



 Defines a hierarchical name space where each level of
  the namespace is separated by a “ . ”
   e.g 192.168.64.27(class B).
Types of DNS Server

Master DNS server:-
Stores authorative records for your domain




Slave DNS server:-
Relies on master DNS server for data.
Caching-only DNS server:-
Stores recent requests like a proxy server.




Forwarding –only DNS server:-
Refers to all requests to other DNS servers.
DNS Master server configuration
STEP-1:

 bind & caching name server .


 rpm is required to configure
  DNS. Check them for install ,if
  not installed, install them as

   [root@server~]# rpm –qa cach*
   [root@server~]# rpm –qa bind*
DNS Master server configuration
STEP-2:
 Set hostname to
  server.example.com .

 [root@server~]# cat/etc/
  sysconfig /network
  HOSTNAME=
  server.example.com

 Set IP address to
  192.168.0.254
 [root@server~] ifconfig etho
   inet addr: 192.168.0.254
DNS Master server configuration
  STEP-3:
 Create the main configuration file
  for DNS, that is named.conf.
• By default a sample file
 /var/named/chroot/etc/named.
  caching- nameserver .conf ,is
  created
 Edit this one by named.conf file or
  create new one as
 [root@server etc]# vi/
  var/named/chroot/etc/named.conf
 Set directory location for
   Forward zone and Reverse lookup
  zone
DNS Master server configuration
 STEP-4:
 Configure example.com.zone for forward zone and 0.168.192.in-
  address.arpa for reverse zone. They will be stored in
  “/var/named/chroot/var/named/” location.
 Change directory to

 [root@server named]# cd/ var/named/chroot/var/named
 Copy sample file to name we have set in named.conf.

 [root@server named]# cp localhost.zone example.com.zone

 [root@server named]# cp named.local 0.168.192.in-
  addr.arpa.zone
DNS Master server configuration
  STEP-5:
  Open forward zone file
  [root@server named]# vi
   example.com.zone
   and modify as
DNS Master server configuration

STEP-5 contd:

Open reverse lookup zone file

 [root@server named]# vi
  0.168.192.in-addr.arpa.zone
  and modify as
DNS Master server configuration

STEP-6:
Change the ownership of these zone file to named group.



 [root@server named]# chgrp named example.com.zone


 [root@server named]# chgrp named 0.168.192.in-
  addr.arpa.zone
DNS Master server configuration
STEP-7:
 Now start the named service


 If service restart without any error then the master name
  server is successfully configured
Summary

 DNS is an integral part in most protocols
  used in the internet.
 Makes the internet human friendly for all
  of us..
 Is the world’s largest distributed database
  system.
 Fits the international model perfectly.
 In simple terms DNS is a mapping
  between names and IP addresses.
DNS server configuration

DNS server configuration

  • 2.
    INTRODUCTION TO DNSSERVER  DNS provides the resolution of host names to IP & vice versa. . e.g www.wbut.ac.in to 192.168.43.10 (IPv4)  Defines a hierarchical name space where each level of the namespace is separated by a “ . ” e.g 192.168.64.27(class B).
  • 3.
    Types of DNSServer Master DNS server:- Stores authorative records for your domain Slave DNS server:- Relies on master DNS server for data.
  • 4.
    Caching-only DNS server:- Storesrecent requests like a proxy server. Forwarding –only DNS server:- Refers to all requests to other DNS servers.
  • 5.
    DNS Master serverconfiguration STEP-1:  bind & caching name server .  rpm is required to configure DNS. Check them for install ,if not installed, install them as  [root@server~]# rpm –qa cach*  [root@server~]# rpm –qa bind*
  • 6.
    DNS Master serverconfiguration STEP-2:  Set hostname to server.example.com .  [root@server~]# cat/etc/ sysconfig /network HOSTNAME= server.example.com  Set IP address to 192.168.0.254  [root@server~] ifconfig etho inet addr: 192.168.0.254
  • 7.
    DNS Master serverconfiguration STEP-3:  Create the main configuration file for DNS, that is named.conf. • By default a sample file  /var/named/chroot/etc/named. caching- nameserver .conf ,is created  Edit this one by named.conf file or create new one as  [root@server etc]# vi/ var/named/chroot/etc/named.conf  Set directory location for Forward zone and Reverse lookup zone
  • 8.
    DNS Master serverconfiguration  STEP-4:  Configure example.com.zone for forward zone and 0.168.192.in- address.arpa for reverse zone. They will be stored in “/var/named/chroot/var/named/” location.  Change directory to  [root@server named]# cd/ var/named/chroot/var/named  Copy sample file to name we have set in named.conf.  [root@server named]# cp localhost.zone example.com.zone  [root@server named]# cp named.local 0.168.192.in- addr.arpa.zone
  • 9.
    DNS Master serverconfiguration  STEP-5:  Open forward zone file  [root@server named]# vi example.com.zone and modify as
  • 10.
    DNS Master serverconfiguration STEP-5 contd: Open reverse lookup zone file  [root@server named]# vi 0.168.192.in-addr.arpa.zone and modify as
  • 11.
    DNS Master serverconfiguration STEP-6: Change the ownership of these zone file to named group.  [root@server named]# chgrp named example.com.zone  [root@server named]# chgrp named 0.168.192.in- addr.arpa.zone
  • 12.
    DNS Master serverconfiguration STEP-7:  Now start the named service  If service restart without any error then the master name server is successfully configured
  • 13.
    Summary  DNS isan integral part in most protocols used in the internet.  Makes the internet human friendly for all of us..  Is the world’s largest distributed database system.  Fits the international model perfectly.  In simple terms DNS is a mapping between names and IP addresses.

Editor's Notes

  • #8  STEP-3:Create the main configuration file for DNS, that is named.conf.By default a sample file/var/named/chroot/etc/named. caching- nameserver .conf ,is createdEdit this one by named.conf file or create new one as [root@server etc]# vi/ var/named/chroot/etc/named.confSet directory location for Forward zone and Reverse