Tech

Lastly upgrading from isc-dhcp-server to isc-kea for my homelab

[ad_1]

Damaged down that manner, the migration did not look terribly scary—and it is made simpler by the truth that the Kea default config recordsdata come crammed with descriptive feedback and configuration examples to crib from. (And, once more, ISC has completed an excellent job with the docs for Kea. All variations, from deprecated to bleeding-edge, have thorough and extensive online documentation in case you’re interested by what a given choice does or the place to use it—and, as famous above, there are additionally the provided pattern config recordsdata to tear aside if you would like extra detailed examples.)

Configuration time for DHCP

We’ve got two Kea purposes to configure, so we’ll do DHCP first after which get to the DDNS aspect. (Although the DHCP config file additionally incorporates a bunch of DDNS stuff, so I suppose if we’re being pedantic, we’re setting each up directly.)

The primary file to edit, in case you put in Kea through bundle supervisor, is /and so forth/kea/kea-dhcp4.conf. The file ought to have already got some moderately sane defaults in it, and it is value taking a second to look by the feedback and see what these defaults are and what they imply.

Here is a evenly sanitized model of my working kea-dhcp4.conf file:

{
  "Dhcp4": {
    "control-socket": {
      "socket-type": "unix",
      "socket-name": "/tmp/kea4-ctrl-socket"
    },
    "interfaces-config": {
      "interfaces": ["eth0"],
      "dhcp-socket-type": "uncooked"
    },
    "dhcp-ddns": {
      "enable-updates": true
    },
    "ddns-conflict-resolution-mode": "no-check-with-dhcid",
    "ddns-override-client-update": true,
    "ddns-override-no-update": true,
    "ddns-qualifying-suffix": "bigdinosaur.lan",
    "authoritative": true,
    "valid-lifetime": 86400,
    "renew-timer": 43200,
    "expired-leases-processing": {
      "reclaim-timer-wait-time": 3600,
      "hold-reclaimed-time": 3600,
      "max-reclaim-leases": 0,
      "max-reclaim-time": 0
    },
    "loggers": [
    {
      "name": "kea-dhcp4",
      "output_options": [
        {
          "output": "syslog",
          "pattern": "%-5p %mn",
          "maxsize": 1048576,
          "maxver": 8
        }
      ],
      "severity": "INFO",
      "debuglevel": 0
      }
    ],
    "reservations-global": false,
    "reservations-in-subnet": true,
    "reservations-out-of-pool": true,
    "host-reservation-identifiers": [
      "hw-address"
    ],
    "subnet4": [
      {
        "id": 1,
        "subnet": "10.10.10.0/24",
        "pools": [
          {
            "pool": "10.10.10.170 - 10.10.10.254"
          }
        ],
        "option-data": [
          {
            "name": "subnet-mask",
            "data": "255.255.255.0"
          },
          {
            "name": "routers",
            "data": "10.10.10.1"
          },
          {
            "name": "broadcast-address",
            "data": "10.10.10.255"
          },
          {
            "name": "domain-name-servers",
            "data": "10.10.10.53"
          },
          {
            "name": "domain-name",
            "data": "bigdinosaur.lan"
          }
        ],
        "reservations": [
          {
            "hostname": "host1.bigdinosaur.lan",
            "hw-address": "aa:bb:cc:dd:ee:ff",
            "ip-address": "10.10.10.100"
          },
          {
            "hostname": "host2.bigdinosaur.lan",
            "hw-address": "ff:ee:dd:cc:bb:aa",
            "ip-address": "10.10.10.101"
          }
        ]
      }
    ]
  }
}

The primary stanzas arrange the management socket on which the DHCP course of listens for administration API instructions (we’re not going to arrange the administration device, which is overkill for a homelab, however this can make sure the socket exists in case you ever determine to go in that course). In addition they arrange the interface on which Kea listens for DHCP requests, they usually inform Kea to pay attention for these requests in uncooked socket mode. You nearly definitely need uncooked as your DHCP socket sort (see here for why), however this may also be set to udp if wanted.

[ad_2]

Source

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button