DNS question

billhassell at my-deja.com billhassell at my-deja.com
Fri Apr 28 00:55:40 UTC 2000


I have a SUN box "gumby" running Solaris 2.7 and not running named.
It has a typical /etc/resolv.conf file with a domain and two nameserver
entries.

domain domainname.com
nameserver {nameservera IP}    <--secondary nameserver (BIND)
nameserver {nameserverb IP}    <--primary nameserver (NT DNS)

Hosta is a windoze box running DHCP client and gets its IP address
from the DHCP and WINS servers.

On gumby, I run nslookup (which queries nameservera),
querying for hosta.domainname.com. It reports no such host.
A BIND server will not see WINS/DHCP machines (not in zone files).
However, when I ping or telnet to hosta.domainname.com from gumby it
works! Why? Do ping and nslookup use different resolvers?
Gumby is running NIS but has nsswitch.conf setting for hosts -> dns.

If I swap the positions of the nameserver entries in resolv.conf,
then nslookups for hosta resolve. Nameserverb is the primary nameserver
and actually does know hosta's IP whereas nameservera doesn't.

The reason for this is DHCP/WINS on nameserverb is running NT DNS
and nameservera is running BIND. I understand why I am having
problems with this but that is not what my question is about.
My question is: Why does ping find the hosta IP address and nslookup
does not?

The only logical thing I've come up with is that ping's lookup ignores
the nameservera in resolv.conf and asks the root servers where the
Start of Authority is for domainname.com and gets the answer from
the primary nameserver (nameserverb). Nslookup on the other hand just
asks nameservera from resolv.conf and gets an authoritative negative
response (from nameservera). Is there a way to test this theory?
Where does the gethostbyname system call fit into all this?

Would someone enlighten me?

Thanks!
Bill


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the bind-users mailing list