KEA DHCP server
Setting up a local ISC KEA DHCP server on Debian 12.
Pull latest updates and install current stable release (v2.4) from ISC. Debian Bookworm has v2.2.
apt update && apt upgrade -y
curl -1sLf \
'https://dl.cloudsmith.io/public/isc/kea-2-4/setup.deb.sh' \
| sudo -E bash
apt install isc-kea-dhcp4
Basic configuration. Change entries as remarked.
tee /etc/kea/kea-dhcp4.conf << EOF > /dev/null
{
"Dhcp4": {
"interfaces-config": {
# change on your needs
"interfaces": ["eth0"]
},
"control-socket": {
"socket-type": "unix",
"socket-name": "/tmp/kea4-ctrl-socket"
},
"lease-database": {
// Memfile is the simplest and easiest backend to use. It's an in-memory
// C++ database that stores its state in CSV file.
"type": "memfile",
"lfc-interval": 3600
},
"expired-leases-processing": {
"reclaim-timer-wait-time": 10,
"flush-reclaimed-timer-wait-time": 25,
"hold-reclaimed-time": 3600,
"max-reclaim-leases": 100,
"max-reclaim-time": 250,
"unwarned-reclaim-cycles": 5
},
"renew-timer": 21600,
"rebind-timer": 43200,
"valid-lifetime": 86400,
"option-data": [
{
"name": "domain-name-servers",
# change on your needs
"data": "192.168.123.1"
},
{
"name": "domain-name",
# change on your needs
"data": "home.lan"
},
{
"name": "domain-search",
# change on your needs
"data": "home.lan"
},
],
"subnet4": [
{
# change on your needs
"subnet": "192.168.123.0/24",
# change on your needs
"pools": [ { "pool": "192.168.123.31 - 192.168.123.99" } ],
"option-data": [
{
"name": "routers",
# change on your needs
"data": "192.168.123.1"
}
],
"reservations": [
{
"hw-address": "00:11:22:33:44:55",
"ip-address": "192.123.123.3",
"hostname": "hostnameA"
},
{
"hw-address": "66:77:88:99:aa:bb",
"ip-address": "192.168.123.4",
"hostname": "hostnameB"
}
]
}
],
"loggers": [
{
"name": "kea-dhcp4",
"severity": "ERROR",
"output_options": [
{
"output": "/var/log/kea/kea-dhcp4.log",
"maxsize": 204800,
"maxver": 4
}
]
}
]
}
}
EOF
Restart service.
systemctl enable isc-kea-dhcp4-server && systemctl restart isc-kea-dhcp4-server