Friday, July 29, 2005

nslookup

==============================================================================
TOPIC: nslookup doing a reverse lookup of nameserver ??
http://groups-beta.google.com/group/comp.unix.solaris/browse_thread/thread/6989d1d50a7227ef
==============================================================================

== 1 of 1 ==
Date: Tues 26 Jul 2005 13:06
From: jms

Solaris8 on SPARC.

I just saw today that nslookup was doing a reverse lookup of the nameserver
( an internal machine ). That is, if I do "nslookup www.google.com", it
tries to get the reverse lookup of 192.168.0.1 ( the nameserver defined
in /etc/resolv.conf ). Thus, all query fails.

Funny thing is, it was working before without this problem.

Doing an nslookup or dig on another machine that uses the same nameserver
does not exhibit this problem.

Note that I have stopped nscd just to make sure.

# nslookup -d2 www.google.com
;; res_nmkquery(QUERY, 1.0.168.192.in-addr.arpa, IN, PTR)
------------
SendRequest(), len 42
HEADER:
opcode = QUERY, id = 16288, rcode = NOERROR
header flags: query, want recursion
questions = 1, answers = 0, authority records = 0, additional = 0

QUESTIONS:
1.0.168.192.in-addr.arpa, type = PTR, class = IN

------------
------------
Got answer (119 bytes):
HEADER:
opcode = QUERY, id = 16288, rcode = NXDOMAIN
header flags: response, want recursion, recursion avail.
questions = 1, answers = 0, authority records = 1, additional = 0

QUESTIONS:
1.0.168.192.in-addr.arpa, type = PTR, class = IN
AUTHORITY RECORDS:
-> 168.192.in-addr.arpa
type = SOA, class = IN, dlen = 65
ttl = 118 (118)
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.0.1: Non-existent host/domain
*** Default servers are not available

# cat /etc/resolv.conf
nameserver 192.168.0.1

# cat /etc/hosts
<.... snip...>
192.168.0.1 router dns
<.... snip...>

# cat /etc/nsswitch.conf
<.... snip...>
hosts: files dns
ipnodes: files
networks: files dns
<.... snip...>

0 Comments:

Post a Comment

<< Home