Rowland penny
2020-May-21 20:37 UTC
[Samba] Fwd: DHCP Updates to DNS - Multiple Entries with Same IP
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
Matt Savin
2020-May-22 06:36 UTC
[Samba] Fwd: DHCP Updates to DNS - Multiple Entries with Same IP
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 >
Marco Gaiarin
2020-May-22 08:09 UTC
[Samba] Fwd: DHCP Updates to DNS - Multiple Entries with Same IP
Mandi! Matt Savin via samba In chel di` si favelave... A bit OT but...> 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;Interesting. But whan happen if a client have a double wired/wireless network connection, and flip between them? Reading manpage, get the same address, right? What happen if two computer with the same name get connected to the same network? Still seems to me that get the same address. Anyway, interesting... -- dott. Marco Gaiarin GNUPG Key ID: 240A3D66 Associazione ``La Nostra Famiglia'' http://www.lanostrafamiglia.it/ Polo FVG - Via della Bont?, 7 - 33078 - San Vito al Tagliamento (PN) marco.gaiarin(at)lanostrafamiglia.it t +39-0434-842711 f +39-0434-842797 Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA! http://www.lanostrafamiglia.it/index.php/it/sostienici/5x1000 (cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)