nslookup

Jim Reid jim at mpn.cp.philips.com
Tue Jun 22 18:07:12 UTC 1999


>>>>> "Kees" == o001put  <o001put at my-deja.com> writes:

    Kees> Hi, I have a unix server (Digital unix 4.0d)configured with
    Kees> bind.  nslookup works, if i enter nslookup <servername> i
    Kees> get correct response from our DNS.  However, if i try to
    Kees> ftp/rcp system responds with: ftp: Unknown Host <server
    Kees> name>

    Kees> When i add the servername to my /etc/hosts commands like ftp
    Kees> <servername> works.

    Kees> It seems to me that when i try to resolve an hostname (using
    Kees> commands like rcp/ftp) the system only looks in the
    Kees> /etc/hosts and does not do an nslookup by the name server.
    Kees> My /etc/resolv.conf is configured correctly (nslooup
    Kees> <servername> works.

DNS tools like nslookup and dig generally read /etc/resolv.conf and
start firing requests at the name server through the resolver
interface (res_query() and friends). Other networking software
generally uses the OS gethostbyname()/gethostbyaddr() routines for
looking up names and addresses. These functions might or might not end
up using the DNS. In your case, it seems they don't. At least not by
default anyway.

In general the gethost*() routines consult another config file -
typically /etc/nsswitch.conf or /etc/svc.conf - to decide how to
perform the lookup: use /etc/hosts, use the DNS, use NIS/YP or some
combination of these. I don't know offhand what the name of that
config file is on Digital Unix 4.0, but it looks to me that the file
needs to be reconfigured so that things like telnet, ftp, rsh, rcp etc
can use the DNS for lookups. Before you do this, make sure the DNS
and /etc/hosts agree with each other about local names. If not, you
might break things that currently work because they rely on entries
that are present in /etc/hosts but aren't in the DNS (or vice versa).



More information about the bind-users mailing list