Lab Exercise 2: Configuring a recursive name server or caching only name server Files involved: named.conf - bind configuration file root.hint - hints file which is the list of 13-root-servers Filename of root hints can be anything. localhost. - loopback forward zone file (127.0.0.1) contains authoritative localhost data. 0.0.127.in-addr.arpa. - loopback reverse zone. (127.0.0.1) contains authoritative reverse mapping for 127.0.0/24 addresses 1. create a separate directory to be used by recursive server % mkdir /var/named/recursive % cd /var/named/recursive 2. download the root hints file from rs.internic.net or from our lab ftp server 192.168.100.1 login as anonymous and use your e-mail as password % ftp 192.168.100.1 % ascii % mget root.hint 3. create the recursive configuration file (named.conf) under /var/named/recursive % vi named.conf // named.conf example // specify bind's working directory options { directory "/var/named/recursive"; }; // recursive/caching name server configuration zone "." { type hints; file "root.hint" // configure the loopback forward zone zone "localhost." { type master; file "localhost"; }; // configure the loopback reverse zone zone "0.0.127.in-addr.arpa." { type master; file db.127.0.0; }; 3. create the forward loopback zone (localhost) under /var/named/recursive % vi localhost $TTL 1d @ SOA localhost root.localhost. ( 1 ;serial no. 30m ;refresh 15m ;retry 1d ;expire 30m ;negative cache ttl NS localhost. localhost A 127.0.0.1 4. create the reverse loopback zone (localhost) under /var/named/recursive %vi db.127.0.0 $TTL 1d @ SOA localhost. root.localhost. ( 1 ;serial no. 30m ;refresh 15m ;retry 1d expire 30m ;negative cache ttl ) NS localhost. 1 PTR localhost 5. Try running bind with -g and -c named.conf and see if bind complains for errors. GOODLUCK!!! % named -g -c named.conf