Hosts file and DNS



  • In my inherited production environment at our data center location, here is the network structure:

    Subnet 1: Traffic that interfaces with the outside world (site-to-site VPN and general Internet traffic)
    Subnet 2: Traffic between the three servers themselves.
    Subnet 3: ISCSI*
    Subnet 4: ISCSI*

    *No longer using the Synology in production, but it's still on the network for a couple of tasks I need to do before shutting it down.

    The servers are configured with hosts files, which haven't had any need to be altered in the last 3 years (since these servers when into production). The NICs connected to subnet 1 are configured to use external DNS servers, but resolution for internal names is handled with the hosts file.

    I've considered deploying a CentOS VM with BIND to handle name resolution, since should name-IP mappings ever need to change, I can make changes once and be done. However, it's unlikely these hosts files will need updating, and (even though it would be trivial) this seems like work for no true benefit.

    Question / food for thought: Have you been in environments where there choice was made to use hosts files rather than DNS? If so, what was the reasoning that brought you to that decision?


  • Service Provider

    Honestly, we use host files all of the time. SO easy to deal with, so reliable. I think in lots of cases they are just fine, especially if you manage them centrally which is trivially easy to do.



  • @scottalanmiller said in Hosts file and DNS:

    Honestly, we use host files all of the time. SO easy to deal with, so reliable. I think in lots of cases they are just fine, especially if you manage them centrally which is trivially easy to do.

    I agree. While DNS has its place, it seems like using it just to not use host files (especially for an enivronment like mine) simply creates over-complexity.

    On centrally managing hosts file, is there some kind of tool you use for that, or is it literally, just have one hosts file stored somewhere, and copy it to X machines?


  • Service Provider

    @EddieJennings said in Hosts file and DNS:

    @scottalanmiller said in Hosts file and DNS:

    Honestly, we use host files all of the time. SO easy to deal with, so reliable. I think in lots of cases they are just fine, especially if you manage them centrally which is trivially easy to do.

    I agree. While DNS has its place, it seems like using it just to not use host files (especially for an enivronment like mine) simply creates over-complexity.

    And remember, for a long time the only thing we had were hosts files. DNS came along later. Everyone was happy with them for a long time.


  • Service Provider

    @EddieJennings said in Hosts file and DNS:

    On centrally managing hosts file, is there some kind of tool you use for that, or is it literally, just have one hosts file stored somewhere, and copy it to X machines?

    Just having something like your Jump box that already has permissions to access each machine and just having a script that automatically puts it on each box is definitely one way to go and super simple.

    Salt, Ansible, Chef, Puppet, cfEngine are all specifically built for this, too.


Log in to reply
 

Looks like your connection to MangoLassi was lost, please wait while we try to reconnect.