After all this it's time to start named. If you're using a dialup
connection connect first. Type `ndc start
', and press return, no
options. If that does not work try `/usr/sbin/ndc start
'
instead. If that back-fires see the
QnA
section. If you view your syslog message file (usually called
/var/adm/messages
, but another directory to look in is
/var/log
and another file to look in is syslog
) while
starting named (do tail -f /var/log/messages
) you should see
something like:
(the lines ending in \ continue on the next line)
Feb 15 01:26:17 roke named[6091]: starting. named 8.1.1 Sat Feb 14 \
00:18:20 MET 1998 ^Ijanl@roke.uio.no:/var/tmp/bind-8.1.1/src/bin/named
Feb 15 01:26:17 roke named[6091]: cache zone "" (IN) loaded (serial 0)
Feb 15 01:26:17 roke named[6091]: master zone "0.0.127.in-addr.arpa" \
(IN) loaded (serial 1)
Feb 15 01:26:17 roke named[6091]: listening [127.0.0.1].53 (lo)
Feb 15 01:26:17 roke named[6091]: listening [129.240.230.92].53 (ippp0)
Feb 15 01:26:17 roke named[6091]: Forwarding source address is [0.0.0.0].1040
Feb 15 01:26:17 roke named[6092]: Ready to answer queries.
If there are any messages about errors then there is a mistake. Named will name the file it is in (one of named.conf and named.root I hope :-) Kill named and go back and check the file.
Now you can test your setup. Start nslookup to examine your work.
$ nslookup
Default Server: localhost
Address: 127.0.0.1
>
If that's what you get it's working. We hope. Anything else, go
back and check everything. Each time you change the named.conf
file you need to restart named using the ndc restart
command.
Now you can enter a query. Try looking up some machine close to
you. pat.uio.no
is close to me, at the University of Oslo:
> pat.uio.no
Server: localhost
Address: 127.0.0.1
Name: pat.uio.no
Address: 129.240.130.16
nslookup now asked your named to look for the machine
pat.uio.no
. It then contacted one of the name server machines
named in your root.hints
file, and asked its way from there.
It might take tiny while before you get the result as it may need to
search all the domains you named in /etc/resolv.conf
.
If you ask the same again you get this:
> pat.uio.no
Server: localhost
Address: 127.0.0.1
Non-authoritative answer:
Name: pat.uio.no
Address: 129.240.2.50
Note the ``Non-authoritative answer:
'' line we got this time
around. That means that named did not go out on the network to ask
this time, the information is in the cache now. But the cached
information might be out of date (stale). So you are informed of
this (very slight) possibility by it saying `Non-authorative
answer:
'. When nslookup
says this the second time you ask for a
host it's a sure sign that named caches the information and that it's
working. You exit nslookup
by giving the command `exit
'.