Install KeaDHCP 1.4 (Proxmox CT)

This is a checklist based on the official KeaDHCP Documentation about creating a KeaDHCP Server using a MySQL Database in a Proxmox Container running Ubuntu 16.04.

Proxmox CT Creation

  • New Proxmox CT:
    • Passwort: supersecret123
    • Template: Ubuntu 16.04
    • Disk Size: 8GB
    • CPU: 2 Core
    • RAM: 2 GB
  • apt-get update && apt-get upgrade

Install build requirement software

Install MySQL Server

  • apt-get install mysql-server mysql-client
    • root password: reallysecret123

Download and Install KeaDHCP

MySQL Setup

  • mysql -u root -p
    • CREATE DATABASE kea;
    • GRANT ALL ON kea.* to kea@localhost IDENTIFIED BY ‘hypersecret123‘;
    • quit;
  • kea-admin lease-init mysql -u kea -p hypersecret123 -n kea

KeaDHCP Config and Startup

  • nano /usr/local/etc/kea/keactrl.conf
    • Change ‘dhcp6=no’ to ‘dhcp6=yes’
  • cd /usr/local/etc/kea/
    • nano kea-dhcp4.conf
      • Add interface(s) to listen on at top of file
      • Adjust MySQL Settings in line 72ff.
    • nano kea-dhcp6.conf
      • Add interface(s) to listen on at top of file
      • Adjust MySQL Settings in line 64ff.
  • keactrl start
  • tail -f /usr/local/var/log/kea-dhcp4.log

For more standard DHCPv4 Options, check the official documentation.

Example configuration for 10.10.10.1/24 subnet, listening on “eth0”, using VLAN 10:

Create first hosts entry

  • cd ~/
  • touch add_host.sql
  • nano add_host.sql

  • mysql -u root -p kea < add_host.sql

Create human readable view for dhcp hosts

  • cd ~/
  • touch create_hosts_h.sql
  • nano create_hosts_h.sql

  • mysql -u root -p kea < create_hosts_h.sql
    • SELECT * FROM kea.hosts_h;

 

Check logs to see IF DHCP requests SUCCEED

  • tail -f /usr/local/var/log/kea-dhcp4.log