[K12OSN] Assigning hostnames dynamically

Jim McQuillan jam at mcquil.com
Thu Sep 22 04:51:43 UTC 2005


After being puzzled by this problem for a couple years now, we've
finally spent a little bit of time to figure out how to get hostnames
assigned to workstations that are using dynamically assigned IP
addresses.

The main trick is include the following line in your dhcpd.conf file:

    get-lease-hostnames   true;

AND, make sure that you DO NOT have this line:

    use-host-decl-names  on;

Take a look at this wiki entry that explains it a bit better:


http://wiki.ltsp.org/twiki/bin/view/Ltsp/DHCP#Automatically_assigning_hostname


What's cool about this solution, is that both the client AND the server
will have exactly the same value for the hostname for that client,
because they both get their information from the same place.
Whereas, by setting a hostname in the dhcpd.conf file, using static
'host ws001 { ....}' entries, it was easy for the client to have one
idea as to its hostname, and the server would have a different idea of
the hostname, because it got it from /etc/hosts, or from DNS.

All I can say is, it's amazing what you can do, when you have the source
code for dhcpd, so you can see why it wasn't working as described in the
dhcpd.conf manpage (the use-host-decl-names was messing us up).

g'nite,

Jim McQuillan
jam at Ltsp.org




More information about the K12OSN mailing list