I plan on standardizing host naming conventions and want to setup an "internal" network to allow easy communication between different servers. We purchase servers from multiple different dedicated server providers that aren't physically connected to the same local network. Currently when configuring web servers etc. we use each machines IP address. I wish to replace this with hostnames like "db1-fr.internalnet" to simplify things and to make things easily understandable. What is the best way to handle Name resolution on each machine? I'm currently planning on just plonking entries in the hosts file for each server however maintainability-wise this seems pretty low on the scale. I want to try and avoid hosting a full blown DNS server simply for internal network lookups but if that is the recommended way it is certainly an option. My next question would then be, where is the appropriate place to configure this DNS server? If I replace the server wide DNS servers things will start to break. Is there a certain config file for local lookups?
if your happy to use a production domain then you could run DNSMasq on your internal network and have all your servers use it as there caching resolver
this has 2 benefits
to give a bit more info about point 2 above from the dnsmasq example config:
basically this means that if you ever do a DNS lookup for an address that normally returns IP 184.108.40.206 in DNS it will rewrite it on the fly to return 220.127.116.11
replace that for your external IP to internal IP mapping and then your on to a winner
the alternative if you want to use an "internal only zone" would again be to use DNSmasq and the hosts file on the dnsmasq server to define your internal DNS records, dnsmasq uses your hosts file and its configured external resolvers to return DNS results to its clients (with hosts file taking priority by default) just like if you were to add the records to the hosts file on each box but only having to do it in a single location
Just remember to reload/restart dnsmasq when you make changes to the hosts file on that machine