Micetro uses the Kea API to communicate with the DHCP server(s). For the management of leases, Micetro requires the installation of the Kea hook library libdhcp_lease_cmds.so in addition to the DHCP Agent. For information about Kea's Hook Libraries, refer to the Kea documentation.
kea-hooks package.Configuring the Hooks Library
After installing the Hooks Library, you need to configure it so that Micetro can use the Kea API to communicate with your Kea server(s). To configure the Hooks Library:
- Open the kea-dhcp4.conf file and locate the
hooks-librariesarray. - Add the Lease Commands Hooks library
libdhcp_lease_cmds.so:
"hooks-libraries":[ { "library" : "/lib64/kea/hooks/libdhcp_lease_cmds.so", "parameters" : {} } ]Tip: The location of the libdhcp_lease_cmds.so library may vary depending on your distribution. To locate it, use the command whereis libdhcp_lease_cmds.so. - After adding the library, restart your Kea server and, if applicable, the Kea Control Agent.
For Kea servers in a failover relationship, you also need to install the libdhcp_ha.so Hooks library in order to create a failover relationship. For more information and instructions, refer to High Availability Hooks Library.
For all peer servers in a Kea DHCP failover relationship, these two hooks must be installed to ensure synchronized functionality:
subnet_cmds, which allows you to list, add, and change subnet configuration in Kea without restarting the server.class_cmds, which allows you to add, update, delete, and retrieve configured DHCP client classes wtihout needing to restart the server.
These hooks are enabled by default and Micetro will automatically use the commands associated with them. If you do not want these commands to be used automatically, you can disable the hooks:
- Locate the DHCP Agent's preferences.cfg file.
- Change the value for the
<UseKeaPremiumHooksvalue>preference attribute to false. - Restart your Kea services.Important: Restarting the service is required for the changes you've made to its configuration to take effect.