On Wed, 11 Oct 2006, in the Usenet newsgroup comp.os.linux.networking, in
article <003d01c6ed79$23837000$0101a8c0@local>, Mark wrote:
>This is a multi-part message in MIME format.
[grumble]
>What seems to happen is that if I use nslookup to lookup a local ( that
>is on the same network ) name, it works, but if I try and ping it by
>name it fails. I can ping local machines by ip addresss so it's not a
>firewall issue or similar
The difference between the way nslookup (and dig, and dnsquery, and host)
work and the way applications like ping work is that the applications
consult /etc/host.conf (old stuff) or /etc/nsswitch.conf (newer applications
generally using glibc2), and follow the sequence there, while the DNS query
tools ignore that file, and ONLY consult name servers.
[compton ~]$ grep host /etc/host.conf /etc/nsswitch.conf
/etc/host.conf

rder hosts,bind
/etc/nsswitch.conf:hosts: files nisplus nis dns
[compton ~]$
Here, /etc/host.conf directs the resolver to look at "hosts" (the /etc/hosts
file) before making a DNS query. The line in /etc/nsswitch.conf directs the
resolver to "files" (again, /etc/hosts), then to NIS+ (not often used), NIS
(the 'yp' commands - again not often used), before trying DNS.
Thus, what's in your hosts file? Is it getting sidetracked there?
Another thing _might_ be nasty effects of the helper keywords in
/etc/resolv.conf - the 'domain' or 'search' terms, neither of which do _I_
recommend. See the 'man 5 resolver' man page and note the cautions.
If all else fails, run tcpdump listening on the appropriate network
interface, and compare the "dialog" between your computer and the name
server as you use nslookup and an application like ping.
>Non-local names resolve ok, as I have set them to be forwarded to my
>host providers DNS server.
Check also what is listed in /etc/resolv.conf, remembering that the
resolver believes the first answer it gets - even if that answer is
"I don't know" (NXDOMAIN).
>------=_NextPart_000_0039_01C6ED81.85431D10
>Content-Type: text/html;
And fix the browser - HTML does NOT belong on Usenet.
Old guy