name resolution for ping different?
Jeremy C. Reed
reed at reedmedia.net
Thu Jan 18 17:06:37 MST 2007
On Thu, 18 Jan 2007, Dazed_75 wrote:
...
> It would appear that on hplaptop, the name resolution used by ping,
> tracepath, and traceroute is NOT being done through a DNS call. Any clues
> would be appreciated.
ping and traceroute use gethostbyname to do the name lookup. While dig
and nslookup use DNS directly.
When using gethostbyname, it uses nsswitch.conf, host.conf or other
chooser to select which sources for DNS lookups to use and what order to
use.
Commonly your local file /etc/hosts is used first and then normal DNS
lookups is used if needed. Your normal DNS lookups are controlled by
/etc/resolv.conf.
So start by looking at /etc/hosts and then /etc/resolv.conf.
Jeremy C. Reed
More information about the PLUG-discuss
mailing list