[Kea-users] Problem with assigning static address

Darren Ankney darren.ankney at gmail.com
Tue Nov 4 22:43:54 UTC 2025


Hi Alex,

Start by checking your logs.  There should be logs pertaining to
address allocation.  Look for Kea locating your client's reservation.
There will be some reason that this reservation is ignored and a
dynamic address assigned instead.  You have DEBUG level 40 enabled so
most or all of these messages should be logged.  Your logs seem to be
going to stderr, assuming you are starting with systemd, they should
be visible using journalctl.  There is a section in the ARM that tells
you what log messages mean:
https://kea.readthedocs.io/en/kea-2.6.4/kea-messages.html# you will
find capitalized keyword in the logs (e.g.,
ALLOC_ENGINE_V4_DISCOVER_HR) you can search this manual using that
keyword and read about the message.

Hope this helps.

Thank you,
Darren Ankney

On Tue, Nov 4, 2025 at 11:40 AM Alexander V. Nikolaev <avnick at gmail.com> wrote:
>
> Hello!
>
> I have a setup of dhcpd v4, with static IP assigned to my testbed laptop, and I have following problem: my laptop with 80% probability gets his own address, but sometimes gets random IP from dynamic pool. I tried to restrict reservation by hw-address only, and disable match-client-id, but it didn't work. (client use systemd-networkd as dhcp client, cycling nixos install usb flash and installed system -- I debug customized installer scripts, so reboot quite often)
>
> So my "carbon" host gets 172.16.228.6 normally, but on the next reboot could get 172.16.228.130, which is weird.
>
> Do you folks have an idea how to troubleshoot this?
>
> I have following configuration of KEA v3.0.1
> (slightly censored, I strip unrelated host reservations)
> {
>   "Dhcp4": {
>     "host-reservation-identifiers": [
>       "hw-address"
>     ],
>     "interfaces-config": {
>       "interfaces": [
>         "enp3s0",
>         "wifi1"
>       ]
>     },
>     "lease-database": {
>       "name": "/var/lib/kea/dhcp4.leases",
>       "persist": true,
>       "type": "memfile"
>     },
>     "loggers": [
>       {
>         "debuglevel": 40,
>         "name": "kea-dhcp4",
>         "output_options": [
>           {
>             "output": "stderr"
>           }
>         ],
>         "severity": "DEBUG"
>       }
>     ],
>     "match-client-id": false,
>     "rebind-timer": 2000,
>     "renew-timer": 1000,
>     "subnet4": [
>       {
>         "authoritative": true,
>         "id": 228,
>         "option-data": [
>           {
>             "data": "172.16.228.1",
>             "name": "domain-name-servers"
>           },
>           {
>             "data": "home",
>             "name": "domain-name"
>           },
>           {
>             "data": "172.16.228.1",
>             "name": "routers"
>           }
>         ],
>         "pools": [
>           {
>             "pool": "172.16.228.129 - 172.16.228.254"
>           }
>         ],
>         "reservations": [
>           {
>             "hostname": "printer",
>             "hw-address": "70:5a:0f:13:90:d2",
>             "ip-address": "172.16.228.10"
>           },
>           {
>             "hostname": "carbon",
>             "hw-address": "00:e0:4d:78:97:ee",
>             "ip-address": "172.16.228.6"
>           }
>         ],
>         "subnet": "172.16.228.0/24"
>       },
>       {
>         "id": 229,
>         "option-data": [
>           {
>             "data": "172.16.229.1",
>             "name": "routers"
>           },
>           {
>             "data": "home",
>             "name": "domain-name"
>           },
>           {
>             "data": "172.16.229.1",
>             "name": "domain-name-servers"
>           }
>         ],
>         "pools": [
>           {
>             "pool": "172.16.229.129 - 172.16.229.254"
>           }
>         ],
>
>         "subnet": "172.16.229.0/24"
>       }
>     ],
>     "valid-lifetime": 4000
>   }
> }
>
> Many thanks,
> Alex
> --
> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
>
> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
> Kea-users at lists.isc.org


More information about the Kea-users mailing list