Failover | How sync fixed-addresses definition between master and slave

Anton Shevtsov <[email protected]> Thu, 21 Nov 2024 10:45:21 +0500
Newsgroups gmane.network.dhcp.isc.dhcp-client
Organization BaseALT
Message-ID <0eb07392-f064-420a-bd04-feb88d8593f8__13155.0460051344$1732167946$gmane$org@basealt.ru>
This is a multi-part message in MIME format.
--===============8011089829846816109==
Content-Type: multipart/alternative;
 boundary="------------LRv4f3PqeCftXtkXurFg00eE"
Content-Language: ru

This is a multi-part message in MIME format.
--------------LRv4f3PqeCftXtkXurFg00eE
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

I make failover confuguration, all work fine. But i have one question - 
how sync fixed-addresses definition between master and slave?

My /etc/dhcp/dhcpd.conf from 'primary' node. Static addresses i moved to 
static.conf.

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?

#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;
}



--
Anton
--------------LRv4f3PqeCftXtkXurFg00eE
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <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 class="moz-signature">--</div>
    <div class="moz-signature">Anton<br>
    </div>
  </body>
</html>

--------------LRv4f3PqeCftXtkXurFg00eE--

--===============8011089829846816109==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-- 
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/dhcp-users

--===============8011089829846816109==--