Configuring Kea DHCP for IPAM
Overview
This module is made to work with Kea DHCP from https://www.isc.org/kea/
Once you set up at least one DHCP app you will be able to assign it to IP lists in IPAM. This will allow you to automatically update the DHCP server configuration on changes to the IP MAC field.
Kea server setup
For this integration to work you need to enable the Kea Control Agent. The full documentation on how to set it up can be found here: https://kea.readthedocs.io/en/latest/arm/agent.html
Example configuration for /etc/kea/kea-ctrl-agent.conf
// This is a basic configuration for the Kea Control Agent.
// RESTful interface to be available at http://0.0.0.0:8000/
"Control-agent": {
"http-host": "0.0.0.0",
"http-port": 8000,
"authentication": {
"type": "basic",
"realm": "kea-control-agent",
"clients": [
{
"user": "admin",
"password": "1234"
} ]
},
// Specify location of the files to which the Control Agent
// should connect to forward commands to the DHCPv4 and DHCPv6
// server via unix domain socket.
"control-sockets": {
"dhcp4": {
"socket-type": "unix",
"socket-name": "/run/kea/kea4-ctrl-socket"
},
"dhcp6": {
"socket-type": "unix",
"socket-name": "/run/kea/kea6-ctrl-socket"
}
}
}
The socket-name
has to point to the related UNIX socket file used by dhcp4
and dhcp6
servers.
You will find those paths in /etc/kea/kea-dhcp4.conf
and /etc/kea/kea-dhcp6.conf
under the Dhcp[46].control-socket
setting. If not present it needs to be added like this:
{
"Dhcp4": {
// ...
"control-socket": {
"socket-type": "unix",
"socket-name": "/run/kea/kea4-ctrl-socket"
}
// ...
}
}
App configuration
Find the Kea DHCP in hosting modules and activate it, this will take you to the app configuration page.
Fill in the connection fields:
Hostname - Address to the Kea server. If your server uses SSL prefix the address with
https://
Username - Username for HTTP basic auth, if enabled in the control agent configuration
Password - Password for the user
Port - Port number for connection
Use the Test Connection button to verify if the module can connect and manage DHCP configuration.
Assigning DHCP app to IP list
Once your app is configured you need to assign it to the IPAM list. To do that navigate to list details and click on the pencil icon. Under DHCP select the desired app and update list details.
DHCP server configuration will be updated with all IPs that have a MAC address and are included in list/sublist assigned with the related app.
Â