<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
I cannot take credit for this design, but we have a slightly different approach that might be more work than you want. But it has worked well for us for many years.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
We have three DHCP servers. One, I call it staging, is never in production. We make our changes in staging and run the DHCP verification to make sure we haven't created any syntax errors. If everything appears to be correct, we have a script on staging that
pushes our configuration into a git repository. A different script is run on staging that triggers production 1 to stop DHCP, pull the current configuration from git, and restart DHCP. Then it triggers production 2 to follow suit. Neither production server
is down very long and they should never be out of sync for more than a second or two.</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> dhcp-users <dhcp-users-bounces@lists.isc.org> on behalf of Glenn Satchell <glenn.satchell@uniq.com.au><br>
<b>Sent:</b> Wednesday, November 27, 2024 01:35<br>
<b>To:</b> Users of ISC DHCP <dhcp-users@lists.isc.org><br>
<b>Subject:</b> Re: Failover | How sync fixed-addresses definition between master and slave</font>
<div> </div>
</div>
<div>
<table class="x_theme-external" id="x_disclaimer" cellpadding="0" cellspacing="0" width="100%" style="margin:0; padding:0; border:0; font-family:Arial,Helvetica,sans-serif; border-collapse:collapse; border-spacing:0; width:100%; color:#000000; margin-bottom:14px">
<tbody>
<tr style="margin:0; padding:0; border:0; font-family:Arial,Helvetica,sans-serif">
<td class="x_graphic" width="60" valign="top" align="center" style="margin:0; padding:0; border:0; font-family:Arial,Helvetica,sans-serif; vertical-align:top; text-align:center; width:60px; background:#ff5400">
<b style="margin:0; padding:0; border:0; font-family:Arial,Helvetica,sans-serif">
</b></td>
<td class="x_content" valign="top" style="margin:0; border:0; font-family:Arial,Helvetica,sans-serif; vertical-align:top; padding:18px; background:#f6f6f6">
<h3 class="x_title" style="margin:0; padding:0; border:0; font-family:Arial,Helvetica,sans-serif; font-size:18px; font-weight:bold; margin-bottom:6px">
This email comes from outside the organization. </h3>
<p class="x_description" style="margin:0; padding:0; border:0; font-family:Arial,Helvetica,sans-serif; font-size:12px">
Do not click links or open attachments unless it is an email you expected to receive.
</p>
</td>
</tr>
</tbody>
</table>
<div dir="auto">
<div>hi Anton</div>
<div dir="auto"><br>
</div>
<div dir="auto">That's the typical strategy, copying the included config file to the other server. You can script it to do the copy and restart.</div>
<div><br>
</div>
<div data-smartmail="gmail_signature">regards,<br>
Glenn</div>
</div>
<div class="x_gmail_extra"><br>
<div class="x_gmail_quote">On 21 Nov 2024 4:45 pm, Anton Shevtsov <shevtsovay@basealt.ru> wrote:<br type="attribution">
<blockquote class="x_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<p>Hi,</p>
<p>I make failover confuguration, all work fine. But i have one question - how sync fixed-addresses definition between master and slave?</p>
<p>My /etc/dhcp/dhcpd.conf from 'primary' node. Static addresses i moved to static.conf.</p>
<p>Should I copy manually to 'slave' node (after each change to this file, and restart/reload dhcpd service) or are anybody have a best practices?</p>
<pre>
#primary
authoritative;
update-static-leases on;
one-lease-per-client on;
omapi-port 7911;
omapi-key omapi_key;
failover peer "partner" {
primary;
address 172.23.116.20;
port 519;
peer address 172.23.116.21;
peer port 520;
max-response-delay 60;
max-unacked-updates 10;
mclt 3600;
split 128;
load balance max seconds 3;
}
key "omapi_key" {
algorithm hmac-md5;
secret "--mysecrethere--";
};
subnet 172.23.116.0 netmask 255.255.255.0 {
option routers 172.23.116.1;
option subnet-mask 255.255.255.0;
option nis-domain "domen.loc";
option domain-name "domen.loc";
option domain-name-servers 172.23.116.20, 172.23.116.21;
option ntp-servers 172.23.116.20, 172.23.116.21;
default-lease-time 21600;
max-lease-time 43200;
pool {
failover peer "partner";
range 172.23.116.30 172.23.116.250;
include "/etc/dhcp/static.conf";
}
}
[root@ns1 dhcp]# cat static.conf
host srv1 {
hardware ethernet 00:50:56:bb:6f:02;
fixed-address 172.23.116.23;
}
host win10 {
hardware ethernet 00:50:56:bb:db:87;
fixed-address 172.23.116.142;
}
</pre>
<p></p>
<div>--</div>
<div>Anton<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</body>
</html>