dynamically generating /etc/hosts

Lonni J Friedman netllama at gmail.com
Sun Jun 3 16:44:34 PDT 2018


My home network has an assortment of Linux systems, which get their IP
assignment via an ISC dhcpd server (also running on Linux).  The dhcp
leases are handed out based on the MAC address of the client, such
that they always get the same IP address assignment.

However, I'd like to be able to generate an /etc/hosts file on all of
the clients that has the IP & hostname associations based on the dhcp
leases.  This is where I'm not finding any solutions which don't
require running a namserver of some sort too.

Anyone have any experience with this sort of thing (generating
/etc/hosts on clients)?

thanks!

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman                                    netllama at gmail.com
LlamaLand                       http://netllama.linux-sxs.org


More information about the Linux-users mailing list