*BSD News Article 82522


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.Hawaii.Edu!news.caldera.com!enews.sgi.com!news.mathworks.com!newsfeed.internetmci.com!news.internetMCI.com!news-admin
From: Chris Marsey <cmarsey@scouter.com>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: order of named and hosts
Date: Fri, 08 Nov 1996 13:11:43 -0700
Organization: InternetMCI
Lines: 31
Message-ID: <328393FF.E23@scouter.com>
References: <55la8h$ce@kauss.rhein-main.de> <3280BD53.41C67EA6@by.by>
NNTP-Posting-Host: 166.37.15.46
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01 (WinNT; I)

Cyril A. Vechera wrote:

> Initial setup is like that:
> bind
> hosts
> 
> and I don't understand why...
> 

As a system admin, if I add a new system and need to connect to it
before it has a DNS entry, a /etc/hosts entry would be quickly made
on the system accessing it for ease of use.

Two months later that new system (earlier) changes it's IP for some
reason like moved to another router segment or something.  The new
IP is put into DNS.

If hosts was checked first, the machine with the bad IP will have 
problems connecting to it.  It will never try the DNS lookup since it's
in the hosts files.

One other reason that comes to mind (and occurred to me once) is if
someone adds a /etc/hosts entry for an IP they want to get to and uses
a machine name for it that is used on the corporate domain already.
If another user tries to get to that corporate name, it will go to
the overridden name in the hosts file and the user may take quite a
while to figure out what's going on. (local system admins can be given
write access to the hosts file but the resolv.conf can be restricted
to the corporate sys admin.)

Chris Marsey