[Samba] DHCP DNS record update: hostname empty

Mani Wieser test_drive_123 at outlook.com
Tue Jan 12 10:19:54 UTC 2021

On 12.01.2021 00:08, Sascha Marcel Hacker via samba wrote:
> Hello,
> I have a little problem with the dhcp update script for the bind backend.
> The problem seems to be with ISC dhcp itself,
> but I hope someone can help me because the script from the samba wiki
> offers this option.
> The problem is, the script or the dhcp server doesn't use the option
> hostname variable I define for every host.
> It only uses the hostname which is offered by the client or the self-made
> "noname" variable.
> thanks in advance
> Sacha
> the link to the wiki page:
> https://wiki.samba.org/index.php/Configure_DHCP_to_update_DNS_records_with_BIND9
> corresponding host definitions from dhcpd.conf for syslog
>          # Wohnzimmer-Echo
>          host Wohnzimmer-Echo {
>                  hardware ethernet  aa:bb:cc:dd:ee:ff ;
>                  fixed-address;
>                  option host-name "Wohnzimmer-Echo";
>          }

Dear Sascha

I was also struggling with the "option host-name" and gave it up to 
solve it, after I stumbled over the "option ddns-hostname".
Additionally you have to add it as first option to the ClientName like: 
pick-first-value(config-option server.ddns-hostname, option host-name,......

ATTENTION: it has to be exact: "config-option server.ddns-hostname"  
(some variations gives no error message despite not working)

the set ClientDHCID can be shorten to binary-to-ascii(16, 8, ":", 

and all the set stancas should be deleted in on "release" and "on 
expiry" (this data is provided from the lease file and will be 
overwritten mostly (when set) with empty values)


More information about the samba mailing list