Kea
  • 08 Feb 2023
  • 3 Minutes to read
  • Dark
    Light

Kea

  • Dark
    Light

Article summary

Kea is an open-source Dynamic Host Configuration Protocol (DHCP) server developed by the Internet Systems Consortium (ISC). You can use this service to hand out and manage the IP addresses of hosts and services on your local network.

Note that Kea service requires the PostgreSQL service to store DHCP data.

  1. Select Kea to add the Kea service.
    dhcp1
  2. Enter a name for this service instance.
    dhcp2
  3. Select the Network to which this service instance will connect.dhcp3
  4. IP Address: Specify the static IP Address for this service instance. It should be in the same IP subnet as the local network CIDR, but must be outside the range of DHCP offered IP addresses. For example, say the network CIDR of the local network is 10.10.0.0/24, and the DHCP server offers IP addresses in the range 10.10.0.15 - 10.10.0.253. Then the static IP address for this service instance can be in the range 10.10.0.1 - 10.10.0.14.dhcp4
  5. Kind: Visible only if you're adding the service to an iNode cluster. Select an option to specify how to run the service in the cluster:
    • Daemon: One instance of the service runs on all iNodes in the cluster.
    • Replica: One instance of the service runs on a set of iNodes that you select using labels in the Run Services in iNodes dropdown.
    • Singleton: One instance of the service runs only on the master iNode. If the master fails, it runs on the iNode that gets elected as the new master.
      You must select the Singleton option for the Kea service to prevent multiple DHCP servers running on the same network.
      dhcp5
  6. Select Next to go to the Configuration tab to provide DHCPv4 and Dynamic DNS configuration.dhcp6
  7. Select an option for the DHCPv4 configuration:
    1. Either upload a new Kea DHCPv4 configuration
      File name of the Kea DHCPv4 configuration file must be kea-dhcp4.conf.
      dhcp7
    2. OR use a Kea DHCPv4 configuration you've uploaded previously.dhcp8
  8. Kea DDNS: Turn this on if you want to use Kea Dynamic DNS (DDNS) server to update DNS mapping based on DHCP lease change events.dhcp9
    Select an option for the Kea DDNS configuration:
    1. Either upload a new Kea DDNS configuration
      File name of the Kea DDNS configuration file must be kea-dhcp-ddns.conf.
      dhcp10
    2. OR use a Kea DDNS configuration you've uploaded previouslydhcp11
      If you are using PowerDNS image version “powerdns-4.5.4-1” (iotium/powerdns:4.5.4-1amd64), make sure to update the DDNS port configuration in the kea-dhcp-ddns.conf file as shown below. The authoritative server in the latest version listens on port 5300 for dynamic DNS updates.
      {
          "DhcpDdns": {
              // Specify a catalog of forward DNS servers (i.e., DNS servers that maintain name-to-address
              // mapping) so that the DDNS server can compare the FQDN in the DNS update requests against
              // the domain of each DNS server in the catalog.
              "forward-ddns": {
                  "ddns-domains": [{
                      // Specify the domain for which forward DNS entries are to be updated.
                      "name": "example.org.",
      
                      // Specify the DNS servers that are serving this domain.
                      "dns-servers": [{"ip-address": "20.4.0.3", "port": 5300 }]
                  }]
              },
      
              // Ignore the reverse update portions of DNS update requests
              "reverse-ddns": {"ddns-domains": []},
      
              // Specify settings for the logging system.
              "loggers": [{
      
                  // Configure logging for the DDNS server
      
                  "name": "kea-dhcp-ddns",
      
                  // Specify where the log messages are sent
                  "output_options": [{"output": "stdout"}],
      
                  // Specify the category of messages to log.
                  // Setting this to DEBUG will log *all* messages.
                  "severity": "DEBUG",
      
                  // When severity is set to DEBUG, you can specify the verbosity of the messages,
                  // with 0 being least verbose and 99 being most verbose.
                  "debuglevel": 99
              }],
      
            //-------------------------------------------------------------------------------------------
            // DON'T CHANGE ANY OF THE SETTINGS BELOW!
            // These are required for the proper functioning of Kea service.
            //-------------------------------------------------------------------------------------------
            "ip-address": "127.0.0.1",
            "port": 53001,
            "dns-server-timeout": 5000,
            "control-socket": {
                "socket-type": "unix",
                "socket-name": "/tmp/kea-ddns-socket.sock"
              }
          }
      }
  9. Select Next to go to the Service tab. Select the Kea image version.dhcp12
  10. Select Next to go to the Remote Logging tab.dhcp13
  11. Turn on Remote Logging if you want to send service logs to a remote destination of your choice using Fluent Bit, an open-source log processor and forwarder.
    1. Select Fluent Bit Version: Select the Fluent Bit image version.dhcp14
    2. Select an option for the Fluent Bit configuration:
      • Either upload a new Fluent Bit configuration
        File name of the Fluent Bit configuration must be fluent-bit.conf.
        dhcp15
      • OR use a Fluent Bit configuration you've uploaded previously.dhcp16

Was this article helpful?

What's Next