Dns – Primany dns configuration Name: hdsn




Дата канвертавання19.04.2016
Памер21.25 Kb.

School of Computer Studies – Seneca College
  1. DNS – Primany DNS configuration

Name: ________________________________ HDSN: _____________________

Student ID: ___________________ Group: ___________ Date: _____________

In this lab, you build a primary name server for your group domain using the BIND package on current RedHat Linux CD. Primary name server does not depend upon having access to other name server on your network.
Every group member must setup a primary name server on their hard disk, and test their setup by pointing their resolver to their own name server.
Remove the IP-host pair of your group members' host from your /etc/hosts file. Mark sure that you can telnet (or ssh) to your group's hosts with IP address only and not by host name.


  1. Use the command “rpm –qa | grep ^bind “ to verify whether you have the BIND packages installed on your hard disk. This should include bind and bind-utils packages. If any one of the two packages is not installed, install it now and check the version of each of the following packages:

bind : bind-utils:




  1. Steps to configure a Primary DNS Server




  1. Stop the name server daemon “named” if it is running.

/etc/rc.d/init.d/named stop (or service named stop)

  1. Edit /etc/resolv.conf

  2. Verify /var/named/named.ca

  3. Edit /var/named/named.local

  4. Edit/add /var/named/named.hosts

  5. Edit/add /var/named/named.rev

  6. Edit/add /etc/named.conf

  7. Start the name server daemon “named”:

/etc/rc.d/init.d/named start (or service named start)



  1. Use the command “ps –ef | grep named” to verify that “named” is not running.




  1. Edit /etc/resolv.conf

Backup or comment out the line starts with “domain”, “search”, and “nameserver”. Add the following line to the file:



domain group-domain-name

search group-domain-name

nameserver ip-address-of-your-host


  1. Verify /var/named/named.ca

This file is not included in the BIND package. You can get the most up-to-date version of this file from ftp://ftp.rs.internic.net or install it from the caching-nameserver rpm package. Check the contents of this file. Record the IPs of the first three root name servers from the file:


1st root name server IP: _______________________
2nd root name server IP: _______________________
3rd root name server IP: _______________________


  1. Edit/create the file /var/named/named.local

Sample:

$TTL 86400

@ IN SOA localhost. root.localhost. (

1997022700 ; Serial

28800 ; Refresh

14400 ; Retry

3600000 ; Expire

86400 ) ; Minimum

IN NS localhost.
1 IN PTR localhost.
Record your version of named.local here:


  1. Edit/add /var/named/named.hosts:

Look up the record layout for the SOA record and put the FQDN of you host and the root’s email address in this record.

Put the FQDN of your host in the NS record as well.


Look up the format for A record and add all the hosts and their IPs in your group to this file.
Copy the contents of /var/named/named.hosts here



  1. Edit/add /var/named/named.rev:

In this file, you can have the same SOA and NS record as your named.host file.

Look up the format for PTR record and add the PTR records for all the hosts that you added to the named.hosts file. Please don’t leave any space at the beginning of a PTR record.


Copy the contents of your /var/named/named.rev file here:



  1. Edit/add /etc/named.conf

The BIND package includes the configuration file “named.conf” for running a caching only nameserver. The file has pointers to the hint file “/var/named/named.ca” and the local zone file “/var/named/named.local”.

You need to add a pointer to the zone file for your group's domain:


zone “group-domain-name” {

Type master;

File “named.hosts”;

};

You also need to add a pointer to the reverse look up file for all the hosts in your group domain (replace x by your pod number):

zone “x.16.172.in-addr.arpa” {

type master;

file “named.rev”;

};
Add the above two stanza to your /etc/named.conf file in the proper place.




  1. Start the “named” daemon (Turn on your DNS server for name lookup)

/etc/rc.d/init.d/named start (or service named start)
Record any message when starting up the “named” server:

  1. You are now ready to try to query your name server.




  1. Enter the command “nslookup -sil ” and press ENTER. At the “>” promt”, type “server” and press ENTER. If your name server is working properly, you should get the following output:

Default Server: xxxxxxxxxxxxx

Address: nnn.nnn.nnn.nnn#53

>
From the output of the “nslookup” command,

What is the Default Server:_____________________________________

What is the address of the Default Server: _________________________


To display the option values stored in your nameserver, type the command “set all” at the nslookup prompt “>”:
What is the output from the “set all” command?

From the above output, what is your “srchlist”?


From the above output, what is the querytype?




  1. While you are still in the nslookup prompt “>”, try all the host names that you have included in your named.hosts file. Verify that your nameserver resolve them into their corresponding IP addresses.

Host Name: __________________ IP: __________________________


Host Name: __________________ IP: __________________________
Host Name: __________________ IP: __________________________


  1. While your name server is running, can you telnet to your group members’ machine by hostname?



  1. Now turn off your name server, can you telnet to your group members’ machine by hostname?



  1. While your name server is NOT running, can you telnet to your group members’ machine by IP?




  1. Once everybody has their name server running, pick one as your group's name server and shutdown all the other name server in your group.

  1. What file should be changed in your system so that you machine will use the new name server?



  1. What changes should be made to that file?


Questions:

  1. While your name server is still running, reboot your machine. Is your name server still running after the reboot?

  2. How would configure your system to turn on the name server service at runlevel 3 and 5?

Answers:
1.

2.


Advanced Network administration 2003 OPS535

RC Page of




База данных защищена авторским правом ©shkola.of.by 2016
звярнуцца да адміністрацыі

    Галоўная старонка