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

Matt Savin matt at tegers.com
Fri May 22 06:36:23 UTC 2020


Rowland,

You're absolutely right - with '128' both DHCP servers listen and *may*
reply, therefore besides failover provide load balancing. Even if both
servers respond with *Offers* to the client, the client will select one and
issue *one Request* to the selected server.
E.g., below is a log records from my failover DHCP (192.168.0.2) server:
May 17 00:09:37 s-dhcpd-2 dhcpd[1578]: DHCPDISCOVER from 80:77:30:a3:d3:e2
via enp2s0
May 17 00:09:38 s-dhcpd-2 dhcpd[1578]: DHCPOFFER on 192.168.0.173 to
80:77:30:a3:d3:e2 (d-host-2) via enp2s0
May 17 00:09:38 s-dhcpd-2 dhcpd[1578]: DHCPREQUEST for 192.168.0.173
(192.168.0.2) from 80:77:30:a3:d3:e2 (d-host-2) via enp2s0
May 17 00:09:38 s-dhcpd-2 dhcpd[1578]: DHCPACK on 192.168.0.173 to
80:77:30:a3:d3:e2 (d-host-2) via enp2s0

Here's a log record from my primary DHCP (192.168.0.1) server:
May 17 00:09:37 s-dhcpd-1 dhcpd[1565]: DHCPDISCOVER from 80:77:30:a3:d3:e2
via eno2: load balance to peer dhcp-failover
May 17 00:09:38 s-dhcpd-1 dhcpd[1565]: DHCPREQUEST for 192.168.0.173
(192.168.0.2) from 80:77:30:a3:d3:e2 via eno2: lease owned by peer

The ISC DHCP server provides a scheduled mechanism to analyze the available
IP addresses on both servers to maintain balance among them. The analysis
itself compares the number of free addresses on a given server against
those on its peer and identifies variances from a 50/50 split.

Following lines in dhcpd.conf should get rid of duplicates and preserve
load balance with '128':
one-lease-per-client  true;
deny                          duplicates;
ignore-client-uids      true;

Of course, nothing wrong with setting the split to 255 and going to pure
failover.

Thank you for your outstanding Samba community service,
Matt

On Thu, May 21, 2020 at 4:37 PM Rowland penny via samba <
samba at lists.samba.org> wrote:

> On 21/05/2020 21:04, Matt Savin wrote:
> > I think you can continue to use '128' (good for load balancing,
> > otherwise 255 is fine). I had the same issue, following dhcpd.conf
> > entries fixed it (the last entry is important):
> >
> > one-lease-per-client  true;
> > deny                          duplicates;
> > ignore-client-uids      true;
> >
> > And it's not a bug, it's by design as is **REQUIRED** by the RFCs.
> Perhaps 'bug' was the wrong word ;-)
>
> It is my understanding that with '128', both dhcp servers listen and
> reply to requests, with '255' only one server listens and replies.
>
> Rowland
>
>
>
> --
> 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