[Samba] samba4 bind9_dlz and dhcp

Rowland Penny rowlandpenny at googlemail.com
Thu Apr 17 04:59:13 MDT 2014


On 17/04/14 11:12, L.P.H. van Belle wrote:
> Hai,
>   
> A bit off topic in the samba forum, but i thinks this is the best place to ask.
>   
> Im having some troubles to get the dhcp server fully working with samba4.
> I dont think this is a samba problem, but as i did say here maybe the best placy to ask..
>   
> It works, but not totaly. The strange thing is for example.
>   
> My debian client is now working.  It adds and deletes as it should.  No problems at all.
> the only thing is see for the linux client, with dhcp server started in debug mode is this message:
>   
> host: '.internal.domain.tld' is not a legal name (empty label)
>   
> ( the full part )
> DHCPACK on 192.168.1.50 to 00:19:d1:01:db:ea (rtd-ptr) via eth0
> Release: IP: 192.168.1.50 HostName: rtd-ptr
> execute_statement argv[0] = /etc/dhcp/bin/dhcp-dyndns.sh
> execute_statement argv[1] = delete
> execute_statement argv[2] = 192.168.1.50
> execute_statement argv[3] = rtd-ptr
> host: '.rotterdam.bazuin.nl' is not a legal name (empty label)
> DHCP-DNS Update succeeded
> DHCPRELEASE of 192.168.1.50 from 00:19:d1:01:db:ea (rtd-ptr) via eth0 (found)

Whoops!! thanks for pointing out a very big bug in my script, delete 
would never have worked, now fixed.

what you have to understand is that two things happen here, the first is 
that the dhcp server hands out an ipaddress to the machine that asks for 
one and then runs the script to update bind9 with the info it has just 
given to the enquiring machine.

The dns update can fail but the dhcp updates shouldn't (except if the OS 
is ubuntu 14.04 and apparmor, but that is another tale altogether )

Rowland

>
> At first the deleting part didnt work, after the modding of the script i got this works ok now.  ( base on hostname )
> ( Rowland, i'll send you the modded scripts as test i used your defaults. )
>   
> Now im testing the windows 7 clients.
> The add  of the A and TXT and PTR records are ok, works fine no problems..
>   
> But when turning the computer off, nothing, i dont see anything happing on the dhcp server.
> Im i hunting ghosts... ?? what im i missing... nothing is deleted, normal behaivor?
> Any enlightment would be great !
>   
> Greetz,
>   
> Louis
>   
> p.s.
>   
> This is the part i have in the DHCP server within the subnet.
>   
>      on commit {
>    log("=============[ START COMMIT ]================");
>    set ClientName = pick (option fqdn.hostname, option host-name));
>    set ClientIP = binary-to-ascii(10, 8, ".", leased-address);
>    set ClientDHCID = binary-to-ascii(16, 8, ":", hardware);
>    log(concat("Commit: IP: ", ClientIP, " DHCID: ", ClientDHCID, " HostName: ", ClientName));
>    execute("/etc/dhcp/bin/dhcp-dyndns.sh", "add", ClientIP, ClientDHCID, ClientName);
>      }
>      on release {
>    log("=============[ START RELEASE ]================");
>    set ClientName = pick-first-value (option fqdn.hostname, option host-name));
>    set ClientIP = binary-to-ascii(10, 8, ".", leased-address);
>    set ClientDHCID = binary-to-ascii(16, 8, ":", hardware);
>    log(concat("Release: IP: ", ClientIP, " HostName: ", ClientName));
>    execute("/etc/dhcp/bin/dhcp-dyndns.sh", "delete", ClientIP, ClientName);
>      }
>      on expiry {
>    log("=============[ START EXPIRY ]================");
>    set ClientIP = binary-to-ascii(10, 8, ".", leased-address);
>    set ClientDHCID = binary-to-ascii(16, 8, ":", hardware);
>    set ClientName = pick-first-value (option fqdn.hostname, option host-name));
>    log(concat("Release: IP: ", ClientIP, " HostName: ", ClientName));
>    execute("/etc/dhcp/bin/dhcp-dyndns.sh", "delete", ClientIP, ClientName);
>      }
>   
>   
>   



More information about the samba mailing list