[systemd-devel] Networkd dhcp hostname override

Dan Williams dcbw at redhat.com
Thu Aug 14 09:46:07 PDT 2014

On Wed, 2014-08-13 at 18:55 -0700, Marcel Holtmann wrote:
> Hi Lennart,
> >> Now that networkd can send the systems hostname to the dhcp server, I would find it useful to have an option to override the hostname that gets sent.
> >> 
> >> In my use case, I would like to setup a number of macvlans with different hostnames.
> >> 
> >> Something as simple as
> >> 
> >> [DHCP]
> >> SendHostname=true
> >> Hostname=foo
> > 
> > Sounds useful, though this could just be a single option
> > SendHostname=foobar or so. If not set it sends the system hostname,
> > otherwise the specified hostname. Or something like that.
> what would this be useful for? Either you send the hostname or you don't.
> I think what you are looking for is an option to set the Client ID. And when that is set, then that is used. If it not set and SendHostname=true, the hostname is used as Client ID. If SendHostname=false and Client ID is not send, then none of them are send.

Typically the send-hostname thing is actually used for DNS updates,
where you send the hostname to the DHCP server, which then gives you a
lease and sends the hostname + IP to the DNS server, so that your
machine is accessible via DNS automatically.  I've never heard of it
being used as a Client ID, and AFAIK the "send hostname" and client ID
can both be used at the same time.


More information about the systemd-devel mailing list