[ale] nslookup works, ping doesn't ???

Brian Pitts brian at polibyte.com
Tue Jan 19 15:00:16 EST 2010


On 01/19/2010 02:28 PM, Greg Freemyer wrote:
> I can ping local machines by IP.
> 
> I can do:
> nslookup yahoo.com 127.0.0.1
> and
> nslookup yahoo.com 10.0.1.44   (my desired primary dns server)
> 
> Both those give the expected result.
> 
> But "ping yahoo.com" comes back with unknown host.
> 
> What gives?
> 
> fyi: resolv.conf is not used in this distro.  I see 10.0.1.44 as my
> nameserver down in /etc/sysconfig/network/config, but I don't know if
> it is working.

You could strace ping and see everywhere it checks for name resolution
info. EG on my box it's reads resolv.conf, nsswitch.conf, host.conf, and
hosts, then does a dns lookup using the server in my resolv.conf file.
You can even see the data sent and received in the sendto() and
recvfrom() calls, although tcpdump would make that easier to read.


-- 
All the best,
Brian Pitts


More information about the Ale mailing list