name resolution for ping different?

Dazed_75 lthielster at gmail.com
Fri Jan 19 00:16:46 MST 2007


Thanks Jeremy!  That is useful information.  I hope you have time to
read/answer a couple of things I am inserting below:

On 1/18/07, Jeremy C. Reed <reed at reedmedia.net> wrote:
>
> 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.


Should I have known or been able to learn this easily in some fashion?  I
had assumed there was a difference but had no clue where to look to find the
difference.

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.


I thought of nsswitch but it was close to the end of the meeting and had no
time to read the man page.  I will do so.  Actually I remembered it affected
lookup sequence from my job back in the 80-90's but not how or how to use
it.

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.


We did check /etc/hosts and cleaned it up and later rebooted.  I was not
sure if the file might be cached or how to force a re-read so the reboot was
to ensure that.  I did not think to check /etc/resolv.conf since we were
able to surf the net.  But now I think on it maybe we were bypassing dnsmasq
on the router and going directly to the ISP dns servers.  I will ask the
owner to check this.  I would have thought though that /etc/resolv.conf
would have been updated as a result of the DHCP request when the system was
rebooted.  Am I wrong there?

  Jeremy C. Reed
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change  you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>

-- 
Be who you are and say what you feel, because those who mind don't matter
and those who matter don't mind.  - Dr. Seuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20070119/16a15b26/attachment.htm 


More information about the PLUG-discuss mailing list