dhclient and automatic fqdn.fqdn generation

Ted Lemon Ted.Lemon at nominum.com
Fri Jul 11 01:07:40 UTC 2008


These past couple of weeks I've been trying to figure out how one
> can automagically generate an fqdn.fqdn string that can be sent
> to the server.
> I want to set the host-name in the dhclient.conf file but I
> want to refrain from initializing the domain-name, instead I
> want to  use the domain-name from the DHCP server (also ISC).
>
> fqdn.fqdn is just host-name + "." + domain-name + "." I tried doing this with
> -----
> send fqdn.server-update on;
> send fqdn.fqdn concat(option host-name, ".", option domain-name, ".");
> -----
> but it doesn't work.

>Option 81 is being sent but Client name is not set properly.

You're probably making more work for yourself than is strictly necessary.   Most DHCP servers, including the Nominum server and the ISC server, will use the contents of the host-name option to construct an FQDN if you don't want to specify the whole domain name yourself.   So if you just write this in your dhclient.conf file, it should work:

        send host-name "foo";

The problem with what you're doing is that the fqdn is sent before the host-name and domain-name options have been set, because those are supplied by the server (at least as you've written it).



More information about the dhcp-users mailing list