resolver's behavior

Kevin Darcy kcd at
Thu Apr 20 23:35:25 UTC 2006

Frank Y.F. Luo wrote:

>I am a little confused about a resolver's behavior, like ping command,
>nslookup command,
>I am querying against a DNS server with recursive turned off
>; <<>> DiG 9.2.4 <<>>
>;; global options:  printcmd
>;; Got answer:
>;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1794
>;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 13, ADDITIONAL: 0
>;              IN      A
>.                       3600000 IN      NS      K.ROOT-SERVERS.NET.
>.                       3600000 IN      NS      L.ROOT-SERVERS.NET.
>.                       3600000 IN      NS      M.ROOT-SERVERS.NET.
>.                       3600000 IN      NS      A.ROOT-SERVERS.NET.
>.                       3600000 IN      NS      B.ROOT-SERVERS.NET.
>.                       3600000 IN      NS      C.ROOT-SERVERS.NET.
>.                       3600000 IN      NS      D.ROOT-SERVERS.NET.
>.                       3600000 IN      NS      E.ROOT-SERVERS.NET.
>.                       3600000 IN      NS      F.ROOT-SERVERS.NET.
>.                       3600000 IN      NS      G.ROOT-SERVERS.NET.
>.                       3600000 IN      NS      H.ROOT-SERVERS.NET.
>.                       3600000 IN      NS      I.ROOT-SERVERS.NET.
>.                       3600000 IN      NS      J.ROOT-SERVERS.NET.
>;; Query time: 23 msec
>However, if i ping
>PING ( 56 data bytes
>Obviously, ping got the name resolved! but How? I am confused
>Also I did the same test on a Solaris box, dig returned the same message
>however the ping returned "unknown host
Command-line tools like "ping" typically use the "system" resolver, 
which is usually configurable (via a system config file like 
/etc/nsswitch.conf or the like) and may or may not even include DNS as 
one of its sources of name information. If the system resolver does look 
at DNS at all, it'll do so by generating recursive rather than 
non-recursive queries. So for a valid comparison to what "ping" is 
seeing, you should do recursive rather than non-recursive queries.

Or, were you looking for a primer on what recursion is/means in the 
context of DNS name resolution?

- Kevin

More information about the bind-users mailing list