Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This question already has an answer here:

I have several Ubuntu computers connected (with wires) by Linksys E1000. Currently, I edit /etc/hosts on each machine to map the hostnames of all the machines and their corresponding IP addresses so that I can access each computer by hostname. But this requires editing of each /etc/hosts files.

I'm wondering if there is a way to somehow setup the network in a way that I don't have to edit all the /etc/hosts files whenever I add a new machine to the network. Thanks.

share|improve this question

marked as duplicate by grawity, Synetech, Andrew Lambert, Kevin Panko, AthomSfere Dec 22 '13 at 17:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
@grawity, your answers on superuser.com/questions/185678/… may not be all applicable to my question. Would you please let me which of the solutions you mentioned (mDNS, NetBIOS, DNS, free DNS subdomains) are relevant to my questions? –  user1424739 Sep 3 '13 at 21:41
    
The first three (mDNS preferred). –  grawity Sep 3 '13 at 22:04

1 Answer 1

a - Configure one of your computers to act as a DNS forwarder and use its hosts file as the master b - Set up your clients to use the router as the DNS server and set some static DNS entries in the router (only valid if the router allows static DNS entries). You could use a Microtik router in between your LAN and your gateway for this, its less than 40 USD and has lots of features. c - Replicate the hosts file periodically between computers by using the cron daemon by means of scp or rsync d - Setup a full DNS server at one of the computers.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.