dns and hosts file

ok i have a question now when i add machines on network that are running unix do i add them in the /etc/hosts file also include them in dns

it depends if your unix machine will be a web server, proxy server or mail server it needs to have a DNS entry.

Any other machine only need an hosts file, the hosts file most an entry of the dns servers hostname and ip address.

Overall it make life easy if all unix servers have a DNS entry but only web servers, proxy servers and Mail servers really need a DNS entry.

if you have a small network (~4 systems) you might as well just add them to your /etc/hosts file. however, if you already have a private DNS server running on your internal network, then yeah add everything in there. that helps to keep consistency in your network and you wont have to worry about one /etc/hosts being outdated.

ok thanx guys

You should also be aware of how your hosts are actually trying to resolve hostnames. Take a look at /etc/nsswitch.conf

Cheers,

Keith