<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="gmail_extra"><br><div class="gmail_quote">On 21 Nov 2024 4:45 pm, Anton Shevtsov <shevtsovay@basealt.ru> wrote:<br type="attribution" /><blockquote class="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>