[Samba] Using BIND DNS Causes Duplicate Host Entries

Rowland penny rpenny at samba.org
Wed May 5 17:42:52 UTC 2021


On 05/05/2021 18:25, ralph strebbing via samba wrote:
> On Tue, May 4, 2021 at 12:14 PM ralph strebbing
> <blackbirdralph at gmail.com> wrote:
>> Hi All,
>>
>> I've had some time to properly monitor my setup now that we've
>> switched to the new DHCP server that utilizes Samba's DNS through Bind
>> with Roland's script facilitating the DNS Updates. However, one issue
>> we've noticed is a considerable amount of duplication in the entries;
>> For example, a host (like my laptop for a perfect example) has
>> multiple nics, and thus has multiple IPs (Wifi, internal NIC, and Port
>> Extender NIC), in my case I have 2 IPs that are being sent to DNS via
>> the dyndns script; However there is now 2 entries in Bind for my
>> laptop's hostname with both IPs, even if only one interface is valid
>> lets say a day later (my wifi is turned off, or I'm only operating on
>> wifi). For some reason, the DNS entries created are not expiring after
>> the lease for DHCP expires causing multiple entries. I was wondering
>> if there is a configuration change that needs made to bind or dhcpd
>> that would help keep this clean? Is there maybe more tweaking needed
>> for Roland's script to handle those expirations in a different way?
>> Overall the goal here is to have DNS update at most with only active
>> IPs as it used to be before utilizing Samba to handle the maintenance
>> of the entries, since we'll have a lot of regular maintenance to keep
>> the DNS table cleaned up otherwise.
>>
>> Below are my sanitized configs and a snippet of syslog for the DHCP server logs.
>> dhcpd: http://haste.thegamingcorner.net/peheqayehu.makefile
>> named.conf.options: http://haste.thegamingcorner.net/kixoqefike.cs
>> Log File: http://haste.thegamingcorner.net/jovufupoco.sql
>>
> So thinking about this, would it be possible to just add an expiration
> time to these DNS entries when they're added (For example to match the
> current DHCP Lease time)? This way expirations are handled in a better
> way since it looks like they don't delete properly.
>
> Ralph
>

I have never tried to add an expiration time, mainly because I have 
never needed to, but it is all opensource, so you can alter the setup in 
any way you like.

Rowland





More information about the samba mailing list