Thoughts on dhcp-client automatically determining the hostname?
apollock at debian.org
Tue Jan 22 22:16:32 UTC 2008
On Wed, Jan 16, 2008 at 12:12:03PM -0800, David W. Hankins wrote:
> 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.
That would work, without requiring any modifications to the dhclient
codebase, but it seems a big hackish.
> > 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?
I'm thinking something along the lines of:
send host-name configured;
send host-name "<hostname>";
which would just fill in the value of the host-name option at packet
creation time by making a gethostname() call.
> 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?
I think we're going beyond the scope I'm talking about. I'm seeing much
interest in the Debian user base about being able to send the configured
hostname to the DHCP server in DHCP request, and not have to double-specify
what the hostname is. That is all.
> 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.
So that would be fine. Rather than relying on a user-specified string in
dhclient.conf to figure out the hostname to send, get it from the operating
system. I would think it's an edge case to want to send a different hostname
than the configured hostname.
> 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 I should have worded this request more precisely. Consider it
"provide a facility to send the configured hostname in a host-name option"
rather than "send the hostname by default".
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: Digital signature
More information about the dhcp-users