Davide Bianchi wrote:
> On 2007-05-09, Polaris431 <(E-Mail Removed)> wrote:
>>
>> Are you saying that Ping does not indicate the true IP address and
>> NSLookup does?
>
> I am saying that Ping is not to be used for testing dns because is not
> designed to do so. Ping doesn't use the same dns-libraries that nslookup
> does, in fact, nslookup has the libraries built-in and is considered
> obsolete for that reason. nslookup can return a complete different
> result than any other network-related tool or software because of the
> different implementation. A quick google search will tell you so.
>
> Davide
>
I agree with the final conclusion, but there is a slight error in this:
GNU ping does not have name resolution libraries built in, but uses glibc's
gethostbyname() which, on GNU/linux at least uses libnss and can derive
it's source data from DNS, LDAP, NIS, files (/etc/hosts) or any number of
other places that someone cares to configure or write a plugin for in some
particular priority order.
nslookup of course interrogates the DNS servers, as does it's more modern
variant: dig
So, to support the point that Davide made, Polaris might want to try adding
this to his /etc/hosts:
10.0.0.1
www.ibm.com
and make sure that /etc/nsswitch.conf contains:
hosts: files dns
Try:
ping
www.ibm.com
nslookup
www.ibm.com
before and after.
Cheers
Tim