[Samba] Fwd: DHCP Updates to DNS - Multiple Entries with Same IP

Derek Cramer cramerd at gmail.com
Thu May 21 11:22:29 UTC 2020


Forgot to CC the list. Duh.

Regards,
Derek


---------- Forwarded message ---------
From: Derek Cramer <cramerd at gmail.com>
Date: Thu, 21 May 2020 at 12:20
Subject: Re: [Samba] DHCP Updates to DNS - Multiple Entries with Same IP
To: <mark.petersen at markofall.com>


I had exactly the same issue with dual dhcp servers. I solved it by
modifying the script to do conditional updates. I.e. only add the A/PTR
entries if they are not already present.

This works for me, but I have no idea if this is best practice for Active
Directory. I suppose a race condition with simultaneous updates is still
possible, but so far I have no more CNF records. My case is a home network
with <50 dhcp clients, so ymmv.

May 21 11:24:59 dc1.internal.example.com dhcpd[256642]: Commit: IP:
192.168.30.171 DHCID: 3c:18:a0:bf:d4:32 Name: L90WGZG5
May 21 11:24:59 dc1.internal.example.com dhcpd[256642]: execute_statement
argv[0] = /etc/dhcp/scripts/dhcp-dyndns.sh
May 21 11:24:59 dc1.internal.example.com dhcpd[256642]: execute_statement
argv[1] = add
May 21 11:24:59 dc1.internal.example.com dhcpd[256642]: execute_statement
argv[2] = 192.168.30.171
May 21 11:24:59 dc1.internal.example.com dhcpd[256642]: execute_statement
argv[3] = 3c:18:a0:bf:d4:32
May 21 11:24:59 dc1.internal.example.com dhcpd[256642]: execute_statement
argv[4] = L90WGZG5
May 21 11:25:00 dc1.internal.example.com dhcpd[260327]: A record already
exists for L90WGZG5 -> 192.168.30.171
May 21 11:25:00 dc1.internal.example.com dhcpd[260328]: PTR record already
exists for 192.168.30.171 -> L90WGZG5.internal.example.com
May 21 11:25:00 dc1.internal.example.com dhcpd[256642]: DHCPREQUEST for
192.168.30.171 from 3c:18:a0:bf:d4:32 (L90WGZG5) via enp1s0
May 21 11:25:00 dc1.internal.example.com dhcpd[256642]: DHCPACK on
192.168.30.171 to 3c:18:a0:bf:d4:32 (L90WGZG5) via enp1s0



Regards,
Derek


On Wed, 20 May 2020 at 22:46, Mark Peteren via samba <samba at lists.samba.org>
wrote:

> On Wed, 2020-05-20 at 10:54 +0100, Rowland penny via samba wrote:
> > On 19/05/2020 22:29, Mark Petersen via samba wrote:
> > > I'm having difficulties with dhcpd updating DNS entries.
> > >
> > > When I look in DNS in my Forward Lookup Zone via Windows 10 I have
> > > multiple A Host records with the
> > > same ip address but the names are like this:
> > >
> > > Aarons-iPad Host(A) 172.20.10.152 static
> > > Aarons-iPadCNF:134dd19a-e0fd-4230-8108-40b4ae3328d9 Host(A)
> > > 172.20.10.152 static
> > > Aarons-iPadCNF:156181c7-c420-409d-ab88-40c56f6b1c88 Host(A)
> > > 172.20.10.152 static
> > The 'CNF' is short for 'collision', multiple things are trying to
> > update
> > the record at the same time, first one wins, the rest get marked
> > with
> > the 'CNF'.
> > > Also,note that on Ubuntu 18.04 aarch64, isc-dhcp-server runs as
> > > dhcpd:dhcpd
> > I just found out that Debian 10 now uses 'dhcpd' as well ;-)
> > > This seems to be happening with iphone/ipads (wireless) but also HP
> > > printers that are all wired.
> >
> > It looks like your clients are trying to update their own records,
> > you
> > only need the script if some or all of your clients cannot update
> > their
> > own records, but, if you use the script, you must stop the clients
> > from
> > trying to update their own records.
> >
> > Rowland
> >
> Rowland,
>
> Thanks for the response.
>
> I had the script running on both of the dhcp servers (they are setup
> with failover), and I had a lot of thses CNF entries in DNS.
>
> So as a test, I removed the script from fddc11 and the problem with all
> of the extra DNS entries has stopped. Hosts are showing up in both DNS
> servers as I had hoped. I will run like this for a while and see how it
> goes.
>
> Mark
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>


More information about the samba mailing list