Sebastian Arcus
2021-Oct-20 10:40 UTC
[Samba] Device ends up with multiple dns records and IP addresses
I have a server with: Samba 4.9.4 in AD mode Bind 9.14.2 ISC Dhcpd 4.4.1 Samba is configured to use Bind for the dns back-end, and dynamic dns updates from dhcpd->Samba->Bind are configured using the script at Samba.org I have this strange situation where one of the printers has ended up with 11 records in the dns back-end: # host SEC001599AB9439 SEC001599AB9439.ihs-uk.lan has address 192.168.51.184 SEC001599AB9439.ihs-uk.lan has address 192.168.51.176 SEC001599AB9439.ihs-uk.lan has address 192.168.51.179 SEC001599AB9439.ihs-uk.lan has address 192.168.51.144 SEC001599AB9439.ihs-uk.lan has address 192.168.51.241 SEC001599AB9439.ihs-uk.lan has address 192.168.51.229 SEC001599AB9439.ihs-uk.lan has address 192.168.51.231 SEC001599AB9439.ihs-uk.lan has address 192.168.51.172 SEC001599AB9439.ihs-uk.lan has address 192.168.51.177 SEC001599AB9439.ihs-uk.lan has address 192.168.51.235 SEC001599AB9439.ihs-uk.lan has address 192.168.51.182 In order to start troubleshooting, I can't get my head around which software is not working properly. Is it the job of dhcpd not to allow a same device to request a different IP, or is it the Samba script, or Samba, or Bind? Which one should normally prevent this from happening? Thank you much for any suggestions.
Rowland Penny
2021-Oct-22 15:28 UTC
[Samba] Device ends up with multiple dns records and IP addresses
On Wed, 2021-10-20 at 11:40 +0100, Sebastian Arcus via samba wrote:> I have a server with: > > Samba 4.9.4 in AD mode > Bind 9.14.2 > ISC Dhcpd 4.4.1 > > Samba is configured to use Bind for the dns back-end, and dynamic > dns > updates from dhcpd->Samba->Bind are configured using the script at > Samba.org > > I have this strange situation where one of the printers has ended up > with 11 records in the dns back-end: > > # host SEC001599AB9439 > SEC001599AB9439.ihs-uk.lan has address 192.168.51.184 > SEC001599AB9439.ihs-uk.lan has address 192.168.51.176 > SEC001599AB9439.ihs-uk.lan has address 192.168.51.179 > SEC001599AB9439.ihs-uk.lan has address 192.168.51.144 > SEC001599AB9439.ihs-uk.lan has address 192.168.51.241 > SEC001599AB9439.ihs-uk.lan has address 192.168.51.229 > SEC001599AB9439.ihs-uk.lan has address 192.168.51.231 > SEC001599AB9439.ihs-uk.lan has address 192.168.51.172 > SEC001599AB9439.ihs-uk.lan has address 192.168.51.177 > SEC001599AB9439.ihs-uk.lan has address 192.168.51.235 > SEC001599AB9439.ihs-uk.lan has address 192.168.51.182 > > In order to start troubleshooting, I can't get my head around which > software is not working properly. Is it the job of dhcpd not to allow > a > same device to request a different IP, or is it the Samba script, or > Samba, or Bind? Which one should normally prevent this from > happening? > Thank you much for any suggestions.Sorry to be so long in replying. Not sure what is going on here. dhcp passes the full ipaddress to the update script e.g. 192.168.0.56 in the 'add' case, any existing 'A' record for the computer is obtained by running 'samba-tool dns query'. If no record is found, a new one is added. If an 'A' record that matches the supplied ipaddress is found, then nothing happens. finally, if the ipaddress found by samba-tool is different from the ipaddress passed to the script, then the existing 'A' record is deleted and a new one added. Is there any way that the printer is updating its own record ? Rowland