| |
Practical Exercises
Objective: configure your node computer as a DNS server and your desktop
as a client to the server. Try configurations of master, slave and caching
servers.
Gethostbyname function
Download perl script gethostbyname.pl.
Make it executable and run it to resolve the IP addresses for following hosts:
localhost, desktop02, and eden.rutgers.edu.
BIND installation on Ubuntu
Generate files rndc.conf and rndc.key:
Copy the secret hash from rndc.key to that in rndc.conf.
Change "default-port 953" for "default-port 955" so it wouldn't try
binding to the TCP port used by rpc.statd.
Besides commented out lines, your rndc.conf and rndc.key should look something
like below:
If named was running,
reload named:
Caching only DNS
Download local zone files localhost.zone,
0.0.127.in-addr.arpa.zone into
/etc/bind.
Download named.conf for the case of caching DNS only:
named.conf-caching and copy it to
/etc/bind/named.conf then start bind:
Check the status of the server:
If it gives you error rndc: connect failed: connection refused,
kill the named
and verify that both rndc.conf and rndc.key contain
the same secret hash; start bind9.
Quiry the server for MX record of host engsoft.rutgers.edu
If the DNS is working properly, it should give you an output with the
answer section as follows:
On your desktop and the node machine, edit file /etc/dhcp3/dhclient.conf and remove domain-name and domain-name-server from the
list of acquired DHCP parameters.
In /etc/resolv.conf on the node make the only entry:
On the desktop, instead 127.0.0.1, use the IP address of the node, accordingly.
Try to query your DNS server from the desktop
Make sure it shows your SERVER: on the bottom
of the output.
Slave DNS
Download named.conf for the case of slave Rutgers DNS,
named.conf-slave, and copy it into
/etc/bind/named.conf
Update the list or root name servers:
Issue command
Check for appearing of new zone files in /var/cache/bind
Query the DNS:
Master DNS
Download named.conf for the case of master DNS,
named.conf-master,
and copy it to /etc/bind/named.conf.
Download the master zone files,
linux.class, 192.168.5,
create directory /var/cache/bind/pdm and copy them into the
directory:
Reload the server:
Query thye server
Modify the zone files in /var/cache/bind/pdm by including your
host entries there and change the serial number. Reload the server after modifications are done:
|
|