UPDATE: nslookup on solaris 9 not working

From: Johnson, Chad (cmjohnson@uslec.com)
Date: Fri Aug 27 2004 - 14:30:33 EDT


        It appears I need to add some information. The problem I am having is using
a caching only name server with solaris. The caching only name server cannot
have PTR records (reverse lookup) defined as it is a hardware device.

        It also appears that solaris cannot use a name server in this method. It
does work on my other non-solaris boxes though. Does anyone have a solution
for using a caching only name server under solaris in which there is no PTR
record for the name server?

###### Original Question ######
        It appears that nslookup may have a problem on Solaris 9. I have just
installed the box and patched it with the latest patch cluster, but nslookup
does not work. nslookup gives the following error:

*** Can't find server name for address 192.168.2.1: Non-existent host/domain
*** Default servers are not available

        The interesting thing is that ping and other network utilities do work by
name. It appears that nslookup is not even checking /etc/nsswitch.conf for
resolution and relying soley on DNS (reverse lookup). I determined this by
performing a 'truss -f nslookup' and nsswitch.conf is never opened,
resolv.conf is parsed however. Also, an 'nslookup -debug' shows the attempt
to reverse lookup (included below) but no attempt to get the nameserver name
from /etc/hosts.

        If anyone has a solution it would be greatly appreciated.

TIA,

Chad.

Here is some supporting information:

$ ping www.yahoo.com
www.yahoo.com is alive

$ traceroute yahoo.com
traceroute: Warning: yahoo.com has multiple addresses; using 216.109.124.73
traceroute to yahoo.com (216.109.124.73), 30 hops max, 40 byte packets
 1 router (192.168.2.1) 1.586 ms 1.472 ms 1.422 ms
 2 10.69.160.1 (10.69.160.1) 11.419 ms 12.325 ms 13.498 ms
 3 fas6-4.chrlncmh-rtr1.carolina.rr.com (24.93.66.45) 11.195 ms 13.823 ms
16.561 ms
(and so on from here to full resolution)

$ cat /etc/resolv.conf
nameserver 192.168.2.1

$ cat /etc/hosts
#
# Internet host table
#
127.0.0.1 localhost loghost
192.168.2.100 webserver webserver.chadshome.com

# Firewall / Router
192.168.2.1 router router.chadshome.com

$ cat /etc/nsswitch.conf
#
# /etc/nsswitch.files:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.

passwd: files
group: files
hosts: files dns
ipnodes: files
networks: files
protocols: files
rpc: files
ethers: files
netmasks: files
bootparams: files
publickey: files
# At present there isn't a 'files' backend for netgroup; the system will
# figure it out pretty quickly, and won't use netgroups at all.
netgroup: files
automount: files
aliases: files
services: files
sendmailvars: files
printers: user files

auth_attr: files
prof_attr: files
project: files

$ nslookup -debug
;; res_nmkquery(QUERY, 1.2.168.192.in-addr.arpa, IN, PTR)
------------
Got answer:
    HEADER:
        opcode = QUERY, id = 48726, rcode = NXDOMAIN
        header flags: response, auth. answer, want recursion, recursion
avail.
        questions = 1, answers = 0, authority records = 1, additional = 0

    QUESTIONS:
        1.2.168.192.in-addr.arpa, type = PTR, class = IN
    AUTHORITY RECORDS:
    -> 168.192.in-addr.arpa
        ttl = 3504 (3504)
        origin = prisoner.iana.org
        mail addr = hostmaster.root-servers.org
        serial = 2002040800
        refresh = 1800 (30M)
        retry = 900 (15M)
        expire = 604800 (1W)
        minimum ttl = 604800 (1W)

------------
*** Can't find server name for address 192.168.2.1: Non-existent host/domain
*** Default servers are not available

$ truss -f nslookup 2>&1 | grep open
12504: open("/var/ld/ld.config", O_RDONLY) Err#2 ENOENT
12504: open("/usr/lib/libl.so.1", O_RDONLY) = 3
12504: open("/usr/lib/libresolv.so.2", O_RDONLY) = 3
12504: open("/usr/lib/libsocket.so.1", O_RDONLY) = 3
12504: open("/usr/lib/libnsl.so.1", O_RDONLY) = 3
12504: open("/usr/lib/libc.so.1", O_RDONLY) = 3
12504: open("/usr/lib/libdl.so.1", O_RDONLY) = 3
12504: open("/usr/lib/libmp.so.2", O_RDONLY) = 3
12504: open("/usr/platform/SUNW,UltraSPARC-IIi-Engine/lib/libc_psr.so.1",
O_RDONLY) = 3
12504: open("/etc/resolv.conf", O_RDONLY) = 3
12504: open("/export/home/chad/.nslookuprc", O_RDONLY) Err#2 ENOENT
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:29:21 EDT