cancel
Showing results for 
Search instead for 
Did you mean: 

using DNS vs /etc/hosts file on the master server

Babu_2
Level 2
   Are there any significant advantages of using the /etc/hosts file ? I have inherited an environment that makes extensive use of the /etc/hosts file while I blv that using DNS would better as I would have one less maintenance task to do.

Appreciate any thoughts on this issue..

Thanks

Babu
6 REPLIES 6

Nathan_Kippen
Level 6
Certified
In our multi-network enviornment we definitely have to rely on the etc/hosts file.  All servers that we backup have at least two or three network interface cards on different networks...
 
The etc/hosts file allows us to specify which network we want to use with the host.
 
 
 
If you have a single network then DNS would work just fine in my eyes.

 

Message Edited by Nathan Kippen on 07-11-200709:41 AM

sdo
Moderator
Moderator
Partner    VIP    Certified
We have single core network, hundreds of clients, 3 DNS domains.  All servers and clients defined in DNS, and all with reverse DNS entries.
 
Only our DMZ clients are in host files.  So we're pretty much fully DNS for NetBackup.
 
Also, our Solaris media servers all have "/etc/nsswitch.conf" setting of "hosts: files dns", otherwise client names of servers residing in DMZ take a very long time to resolve.  N.B. Windows already looks to "hosts" first - so no need for similar setting in Windows.
 
All master and media servers have all of our DNS domains in their search lists.
 
If you have multiple sites, and each site has media server(s) and DNS server(s), then set media servers to look at their own site's DNS server first - not sure if this makes any difference in speed - but might help if links go down.

Stumpr2
Level 6
I use local hosts files.
 
 

DavidParker
Level 6
Agreed (with those using hosts files).

Depending on your environment, host files may or may not be necessary.

I've seen NBU work fine (most of the time) with just plain DNS service, but as soon as you have any problems communicating with a client, you're going to need a host file entry.

That being the case, why not just use host files right from the beginning?

J_H_Is_gone
Level 6
I was not using host files and only using DNS util they decided some servers need more then one name.
So any server that has an alias I put in the host file.
(nslookup <server name>
nslookup <server name>
if you do not get the same answer back both times then a host file entry would help make sure the master id's the client correctly)

sdo
Moderator
Moderator
Partner    VIP    Certified
I guess it depends on your environment.  We have hundreds of clients, OpenVMS, AIX, Solaris and Windows - and DNS is just fine.  The only problem I have is the build teams keep forgetting to request reverse DNS entries.  Oh, and a great many of our clients have multiple actiive NICs and cluster aliases etc... and we don't have a problem.