Re: The old DNS gambit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You need to have files then dns listed.  When a call to gethostbyname is
issued it should search the hosts file first then query DNS.  I have
noted before on other flavors of UNIX that some tools like nslookup will
ignore the host file and always query named.  At the time attributed
that to the fact that a tool like nslookup was designed to query name
servers and did not use the typical gethostbyname calls.  I could be
wrong about that as I never took the time to review the source code.


On Tue, 2003-07-08 at 14:33, Tom Diehl wrote:
> On Tue, 8 Jul 2003, Harry Putnam wrote:
> 
> > Harry Putnam <reader@xxxxxxxxxxx> writes:
> > 
> > > I see absolutely no difference at all.
> > >
> > > host reader.local.net1  returns:
> > > Host reader.local.net1 not found: 3(NXDOMAIN)
> > >
> > > nslookup returns:
> > >
> > > Server:		192.168.0.20
> > > Address:	192.168.0.20#53
> > >
> > > ** server can't find reader.local.net1: NXDOMAIN
> > 
> > I spoke too soon.  There is a major difference.  Any reslotion 
> > on the internet is completely broken with that in place.
> > 
> > None of the usual tools can resolve anthing, connections fail etc.
> > 
> > Setting it back to:
> >    hosts:  files dns
> 
> This is correct. It will first look in /etc/hosts and if it cannot find what
> it needs there it will consult the name servers listed in /etc/resolv.conf.
> 
> > And it starts working again.  By working I mean nslookup can resolve 
> > alpha names to numbers etc, but only outside my little home network.
> 
> I missed the beginning of this thread but you could always setup an internal
> name server if you are trying to resolve internal only names as well as names
> out on the big bad internet. It is IMO simpler than maintaining /etc/hosts files
> on multiple computers.
> 
> HTH,
> 
> -- 
> ......Tom		Registered Linux User #14522	http://counter.li.org
> tdiehl@xxxxxxxxxxxx	My current SpamTrap ------->	mtd123@xxxxxxxxxxxx
-- 
Scot L. Harris <webid@xxxxxxxxxx>




[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux