[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] How can I get hostnames on a very temporary LAN?



On 02/19/16 06:10, Jim Lynch wrote:
> For a special purpose I'm going to have a Netgear router not connected
> to the internet for local communications using DHCP.  I'll have a server
> connected via Ethernet and clients using mostly WIFI. I've seen times
> where in similar setups something assigns a host name to the server.  In
> those cases, I can connect to the server via a host name rather than an
> IP address.  I'd like to do that for this situation.  I can't seem to
> find the right words to get a search engine to tell me how.  I'm not
> running a DNS server.
> 
> I'm thinking the server might be advertising the name but I don't really
> know how it all happens.
> 

There are 3 ways to handle this.

* edit the /etc/hosts files on every system (ansible makes this trivial)

* let the router handle DHCP reservations AND DNS -
DD-WRT/Tomato/pfSense can all do this -
http://blog.jdpfu.com/2011/07/18/use-your-router-to-centralize-your-network-device-management

* avahi ... all the systems advertise their hostname.local and you can
access them using that name.   hadar is one of my machines. If all of
them run the avahi daemon, then hadar.local will work.  avahi has/had
issues for a long time and tended to use 150% of the CPU, so I always
removed it, but if the systems are Ubuntu, I think it comes preinstalled
and working these days.
https://askubuntu.com/questions/2631/access-server-by-host-name

Choose your poison.  I use the first 2.

-- 
Got Linux? Used on smartphones, tablets, desktop computers, media
centers, and servers by kids, Moms, Dads, grandparents and IT
professionals.