CS 241 Assignment #14

Most students completed this guided exercise in class
   on april 26, 2007 (class #11)

   this assignment must be done in class!

objective: to turn on a service to allow dns requests to be
   resolved on your linux system.

   rpm -qa | grep -i bind     # berkeley internet name domain

[root@unix000 ~]# rpm -qa|grep -i bind
bind-libs-9.3.2-41.fc6
bind-chroot-9.3.2-41.fc6
ypbind-1.19-5
bind-utils-9.3.2-41.fc6
bind-9.3.2-41.fc6
[root@unix000 ~]#

     this confirms that the proper files have been installed
     to run this function

   cd /etc
   ls -ld name*

[root@unix000 etc]# ls -ld name*
lrwxrwxrwx 1 root named 52 Mar 22 20:24 named.caching-nameserver.conf ->
/var/named/chroot//etc/named.caching-nameserver.conf
lrwxrwxrwx 1 root named 42 Mar 22 20:24 named.rfc1912.zones ->
/var/named/chroot//etc/named.rfc1912.zones
[root@unix000 etc]#
 
   above shows named files that give hints how to setup named (ie dns).
   next confirm that no dns server is running on your system

nslookup ibm.com localhost

   should wait then say connection timed out
   ie attempt to use localhost as a nameserver failed.

we will now start a caching name server on our linux system

   cd /etc
   service named restart

nslookup ibm.com localhost

   above should work now and show 127.0.0.1 as the dns server
   which is resolving the name to ip.

   in /etc/resolv.conf,
    add this as the first nameserver line
     to use yourself as the primary dns server:
nameserver 0.0.0.0

   might have to wait several minutes for this change to take effect.

to get credit for this homework, 
show me the output of

   nslookup ibm.com 
      # above should automatically use 127.0.0.1 as the nameserver
   named -v

     you are being both the dns client and server
     to resolve ibm.com to an ip address