Thoughts on dhcp-client automatically determining the hostname?

David W. Hankins David_Hankins at
Wed Jan 16 20:12:03 UTC 2008

On Mon, Jan 14, 2008 at 12:46:26PM +1000, Andrew Pollock wrote:
> There's been a bug filed against Debian to allow sending the hostname by
> default. No big deal, except we'd have to put 'send host-name "foo"' in
> dhclient.conf, which would require the dhclient.conf file to be modified at
> package install time, once it knows what the user's hostname is.

or for dhclient.conf to include a second file that is updated (or
generated from at dhclient invocation time) system hostname config,
and could be wholly rewritten without fear of user edits, possibly
leading with a comment to that effect.

> What happens if the user then changes the hostname? Well now they've got to
> go change it in dhclient.conf as well.

automation can and should do it.

but to what extent do you mean...are you just worried about
dhclient.conf, which is read at startup time and retained throughout
runtime, or do you want dhclient to poll gethostname() every time it
sends a packet?

should dhclient-script update 'hostname "$foo"' from server
supplied values so it feeds back?  this supports, at least in theory,
IETF dynamic DNS update mechanisms that allow the server to
'negotiate' a free hostname with the client...trying names until one

should it involve the user to ask if the change in name is acceptable
(like asking if a firewall hole should be opened)?  possibly giving
them an opportunity to try a different name the server might allow?

should that updated value make it back into the persistent system
config for the next restart?

i think none of those questions can be answered yes or no; the answer
changes depending on the user and the expectations of the software
they are using ("fully automatic, user unserviceable" vs "involve me
in important decisions" vs "give me vi").

> I'm at the point where I'm trying to convince the ISC folks that this patch,
> or something in the spirit of this patch, is the way to go.

my vote is 'in the spirit of'.

> So I'm here just asking if other users of the DHCP client think that this
> sort of feature is a good idea, something they want/need/like etc etc.
> Please reply to this email on-list with your thoughts.

i think that dhclient's configuration should come primarily if not
solely from the operating system.  so much so, that i'm tempted to
make the next generation dhclient's configuration mechanism wholly
un-user-friendly, preferring instead to be very machine friendly.

making the place a user would go to adjust this behaviour the
configuration management interface specific to their operating system.

electing to transmit the configured hostname in the host-name and
fqdn options by default is a decision that needs to be made in the
context of the expected users.  i think the OS integrators can and
should make that decision.  same for what to do with values advertised
by DHCP servers; taking them on temporarily or permanently.

so, the problem is more fundamental than "should we send a hostname by
default?"  it is, "should we stop thinking that the system's user is
the primary author of dhclient.conf?"

i think we should, which obviates this, and many other, questions, but
my opinion on the matter is by no means de facto.

it only takes a few short googles to see just how much 'average joe'
users are mystified by how dhclient behaves when standing next to
macos and windows boxes on the same network.  there's a real need

Ash bugud-gul durbatuluk agh burzum-ishi krimpatul.
Why settle for the lesser evil?
David W. Hankins	"If you don't do it right the first time,
Software Engineer		     you'll just have to do it again."
Internet Systems Consortium, Inc.		-- Jack T. Hankins

More information about the dhcp-users mailing list