X

Rate Us :



Share with Friends :

Menu

Domain Name System(DNS) :

The Domain Name System(DNS) is a hierarchical naming system where each level of name is separated by a dot(.)

It resolves user friendly domain names into computer friendly IP addresses. It also resolves IP addresses into domain names.

It provides a centralized database for resolution.


Example : mail.algovalley.com. mail. - subdomain algovalley. - Second-level Domain com - Top-level Domain . - Root


Zone :

It is a storage database which contains all the records. There are two types of zone :-

  • Forward Lookup Zone :
  • It is used for resolving hostnames to IP addresses. It maintains hostname to IP address mapping information.


  • Reverse Lookup Zone :
  • It is used for resolving IP addresses to hostnames. It maintains IP address to hostname mapping information.


Records :


SOA Records [Start of Authority] :-
  • It is the first record in any zone file.

NS Records [Name Server] :-
  • It identifies the DNS server for each zone.

A Records [Address] :-
  • It maps a hostname to an IP address.

CNAME Records [Canonical Name] :-
  • It maps an alias name to the hostname.

PTR Records [Pointer] :-
  • It maps an IP address to the hostname.

MX Records [Mail Exchange] :-
  • It maps a domain name to the mail server.

Requirements :


Installation package : bind*.rpm Port number : 53 (DNS) Configuration files : /etc/named.conf , /etc/named.rfc1912.zones Database Directory : /var/named Service/Daemon : named Default Forward Lookup Zone file_name : named.localhost Default Reverse Lookup Zone file_name : named.loopback


Configure FTP server :


DNS Server System : Check the system IP address - [root@localhost~]#ifconfig [Let say, IP address - 192.168.0.180] Install the packages for DNS server - [root@localhost~]#yum install bind* -y Edit first configuration file - [root@localhost~]#vi /etc/named.conf Set the line number - Go to Esc mode by pressing Shift + : and then type se nu Go to Line no. - 11 and 17 and edit by going to insert mode by pressing Esc then i/I/o/O/a/A (any one of them) 11 listen-on port 53{127.0.0.1;192.168.0.180;}; 17 allow-query {localhost;any;}; Then go to Ex: mode by pressing Esc then Shift + : and type wq! to save and exit. Edit second configuration file - [root@localhost~]#vi /etc/named.rfc1912.zones Set the line number - Go to Esc mode by pressing Shift + : and then type se nu Go to Line no. - 19, 21, 31 and 33 and edit by going to insert mode by pressing Esc then i/I/o/O/a/A (any one of them) 19 zone "algovalley.com" IN{ 21 file "algovalley.for" 31 zone "0.168.192.in-addr.arpa" IN{ 33 file "algovalley.rev" Then go to Ex: mode by pressing Esc then Shift + : and type wq! to save and exit. Enter into zone file database location - [root@localhost~]#cd /var/named Create forward lookup zone file - [root@localhost~]#cp -p named.localhost algovalley.for Create reverse lookup zone file - [root@localhost~]#cp -p named.loopback algovalley.rev Edit forward lookup zone file - [root@localhost~]#vi algovalley.for Set the line number - Go to Esc mode by pressing Shift + : and then type se nu Go to Line no. - 2, 8, 9 and 10 and edit by going to insert mode by pressing Esc then i/I/o/O/a/A (any one of them) 2 @ IN SOA dns.algovalley.com.rname.invalid.( 8 NS dns.algovalley.com. 9 dns A 192.168.0.180 10 ftp A 192.168.0.1 Then go to Ex: mode by pressing Esc then Shift + : and type wq! to save and exit. Edit reverse lookup zone file - [root@localhost~]#vi algovalley.rev Set the line number - Go to Esc mode by pressing Shift + : and then type se nu Go to Line no. - 2, 8, 9 and 10 and edit by going to insert mode by pressing Esc then i/I/o/O/a/A (any one of them) 2 @ IN SOA dns.algovalley.com.rname.invalid.( 8 NS dns.algovalley.com. 9 180 PTR dns.algovalley.com. 10 1 PTR ftp.algovalley.com. Then go to Ex: mode by pressing Esc then Shift + : and type wq! to save and exit. Update the service - [root@localhost~]#service named restart DNS Client System : Edit the file - [root@localhost~]#vi /etc/resolv.conf Add one line by going to insert mode by pressing Esc then i/I/o/O/a/A (any one of them) nameserver 192.168.0.180 Then go to Ex: mode by pressing Esc then Shift + : and type wq! to save and exit. To check DNS host information - [root@localhost~]#nslookup ftp.algovalley.com [by Name] [root@localhost~]#nslookup 192.168.0.1 [by IP address] [root@localhost~]#host ftp.algovalley.com [same as nslookup] [root@localhost~]#dig ftp.algovalley.com [provide complete structure of DNS]