Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jun 2000 10:48:14 +0200
From:      Brad Knowles <blk@skynet.be>
To:        chad@DCFinc.com
Cc:        freebsd.stable@lists.craxx.nl, freebsd-stable@FreeBSD.ORG
Subject:   Re: Weird NSLOOKUP output...
Message-ID:  <v04220800b578d411cacb@[10.0.1.2]>
In-Reply-To: <200006230337.UAA07934@freeway.dcfinc.com>
References:  <200006230337.UAA07934@freeway.dcfinc.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 8:37 PM -0700 2000/6/22, Chad R. Larson wrote:

>  However, as I've noted here before, there is a pitfall.  Most
>  application programs don't call the resolver routines directly.

	Correct.  However, nslookup violated this procedure, by skipping 
the standard routines, and going directly to the resolver.  So, it 
would not show you the same kind of behaviour other programs would.

>  They call "gethostbyname(3)", which =may= query the /etc/hosts file
>  before checking with DNS via the resolver.  So, if you've overloaded
>  a DNS address with one in the hosts file (deliberately or
>  accidentally), your application will not get the same answer you
>  will get from dig/host/nslookup.  Much confusion can result.  Don't
>  ask my how I know this.

	I believe that dig & host both call the standard gethostbyname 
routines, and therefore act in exactly the same way that a "normal" 
program would, whereas nslookup would bypass any sort of service 
switch you might have and instead go directly to the DNS.  It is my 
understanding that this is one of many reasons why nslookup is so 
hated.

--
   These are my opinions -- not to be taken as official Skynet policy
======================================================================
Brad Knowles, <blk@skynet.be>                || Belgacom Skynet SA/NV
Systems Architect, Mail/News/FTP/Proxy Admin || Rue Colonel Bourg, 124
Phone/Fax: +32-2-706.13.11/12.49             || B-1140 Brussels
http://www.skynet.be                         || Belgium


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?v04220800b578d411cacb>