Table of Contents

Back  
 Next
, , ,

Docker - DHCP Server

Since mid 2023 I have been running a Docker ISC Kea Image using base Docker Alpine Linux images, with S6 init system. (ISC Kea is a modern replacement for their DHCP.) The main DHCP server runs on my main server and I have an automatic fall over back up on my separate Linux router. I basically followed the Kea template Home Network of a Power User. I was never quite sure I had the automatic fall over back-up working. On 2023-01-02 I modified a configuration file on the primary server with a syntax error, 8 days later I notice millions of lines of errors on my log files. Sure enough the backup had simply been working. I fixed up the simple syntax error and the primary server took back over. Everything basically worked as expected.

ISC also has a project for a simple GUI interface primarily for Kea and basic for Bind9. There is apparently no Alpine package yet for Stork.

ISC-Kea seems to be provided in a number of packages

PackageDescriptiionComment
isc-kea-adminThis package provides backend database initialization and migration scripts and a DHCP benchmark tool. If you are not using a database backend, you may not need this.Not using a database backend at this time
isc-kea-commonCommon libraries for the ISC Kea DHCP server. Install this.Need this.
isc-kea-ctrl-agentThis package provides the REST API service agent for Kea DHCP.?
isc-kea-devDevelopment headers for ISC Kea DHCP server. Install if you plan to create any custom Kea hooks.Probably do not need.
isc-kea-dhcp4-serverDHCPv4 server.Need this.
isc-kea-dhcp6-serverDHCPv6 server.Do not need at this time.
isc-kea-dhcp-ddns-serverDDNS server.Need this.
isc-kea-docKea documentation. Highly recommended.On a Docker container?
isc-kea-hook-flex-optionFlexible Options hook.What is this?
isc-kea-hook-haHigh Availability hook.What is this?
isc-kea-hook-lease-cmdsLease Commands hook.What is this?
isc-kea-hook-mysql-cbMySQL Configuration Backend.Dont need this at this time.
isc-kea-hook-pgsql-cbPostgreSQL Configuration Backend.Dont need this.
isc-kea-hook-stat-cmdsStatistics Commands hook.?
isc-kea-httpThis package is essential, install it.It is essential…
isc-kea-perfdhcpOptional. Includes a DHCP performance testing tool from ISC.?
isc-kea-shellText client for Kea DHCP Control Agent.?

Network Ports

From IANA Service Name and Transport Protocol Port online Number Registry:

bootps    67   {tcp, udp}       Bootstrap Protocol Server (DHCP)
bootpc    68   {tcp, udp}       Bootstrap Protocol Client (DHCP)

The Kea Control Agent uses port 8000 by default, but that value can be manually defined in its configuration file. (Usually located at /etc/kea/kea-ctrl-agent.conf.) This port needs to be open and accessible on every server that hosts a Kea DHCP service and a Kea Control Agent.

Docker Network Type

This is a good case where the Docker network type needs to be set to host. The DHCP server needs to be directly on the host to function.

DHCP testing

sudo nmap --script broadcast-dhcp-discover will test for DHCP servers on the same network. It will only report the first DHCP server discovered.

Reference

main dhcp4

Use of symlink, TL;DR;

ctrl-agent -t /app/kea-ctrl-agent.conf

Kea logging

I have stored log files in the .config directory that is a Docker mounted volume for persistence and easy external viewing outside container. The following logs files can be seen.

Kea Miscellaneous

References

Back  
 Next