Kea DHCP High Availability - User Guide - Micetro - 26.1.0

Micetro Admin Guide

ft:locale
en-US
Product name
Micetro
Version
26.1.0
Warning: When using Kea 3.0 in High Availability (HA) with multithreading enabled, Kea version 3.0.4 or later is required. Making configuration changes through Micetro, such as creating or deleting DHCP scopes, may cause HA communication to fail when running earlier versions of Kea 3.0. This is due to a defect in Kea tracked as ISC Kea GitLab issue #4145, which was fixed in version 3.2 and then backported to 3.0, ultimately released in version 3.0.4.

In Micetro, you can configure High Availability (HA) for Kea DHCP servers and add failover relationships for them. Both the primary and secondary servers in a failover relationship need to be added to Micetro. Once you've added the servers, you can manage them separately.

For more information about Kea DHCP failover relationships, such as failover modes, in Micetro, refer to Kea DHCP failover relationships.

Warning: Synchronized clocks are essential for the reliable operation of the High Availability setup. If a clock skew is not corrected and exceeds 60 seconds, the High Availability service on each server will be terminated.

There are several aspects of Kea's High Availability feature that you must take into account when setting up failover relationships:

High Availability Hooks Library

Previously only available to paid subscribers, the High Availability Hooks Library is now part of the open-source Kea. The Hooks Library needs to be present on the file system before the Kea DHCP servers can be managed in High Availability mode.

You must have the following hook libraries on your file system before you can add a failover relationship:

  • libdhcp_lease_cmds.so, which enables control commands necessary for High Availability to manage leases on remote servers.
  • libdhcp_ha.so, which implements the High Availability feature.

Micetro searches for hooks in the default location.

Tip:
  • For RedHat-like systems (such as RHEL, CentOS, SUSE, Fedora), the hook library is typically located at /usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_ha.so.
  • For Debian-based systems (such as Ubuntu, Linux Mint, Raspbian), the hook library is usually located at /usr/lib64/kea/hooks/libdhcp_ha.so.
  • You can customize the library’s location by specifying the path using the keaHooksLocation value in the DHCP Agent preferences.cfg file.

If the hooks are located elsewhere, you must specify the correct location using the keaHooksLocation preference value for the DHCP Agent.

Ports and networking

To ensure a seamless Kea High Availability setup, Micetro requires effective communication with each Kea DHCP server through specific ports. This communication is vital both for Micetro’s interaction with the servers and for cross-communication between Kea DHCP servers via the Kea Control Agent.

Both the DHCP Agent and Kea Control Agent default to port 8000, unless a different port was set when the service was added to Micetro. You can manually define this port in the configuration file; for the Kea Control Agent, this file is typically located at /etc/kea/kea-ctrl-agent.conf. It's crucial that you keep this port open and accessible on every server hosting a Kea DHCP service and an agent or the Kea Control Agent.

When using dedicated HTTP endpoints for HA peer-to-peer communication—which is selected when you add a failover relationship for a Kea service—Micetro will use the port number of the Kea service +1 when creating the HA configuration, defaulting to 8001.

If you need to move the Kea service to a different port after it has been added to Micetro, edit the server properties and update the Server name field with the new port number.
Note: The port number needs to be changed in the Kea service or Kea Control Agent first. Then restart the service.
If the Kea service is in a HA setup, you also need to update the port number in the high-availability section of the Kea service configuration. For instructions on how to edit the service configuration, refer to Editing DHCP server configuration.

Adding a High Availability-enabled Kea DHCP server to Micetro

When the Kea High Availability environment is set up correctly, system administrators can add the Kea DHCP servers much like any other DHCP server. For more information, refer to Adding a service.

Important: If the DHCP Agent is running on a machine other than the primary Kea DHCP server, the Agent must be defined when you add the DHCP service to Micetro. In the Add service wizard, make sure to enter the IP address or FQDN of the machine running the DHCP Agent.