Search code examples
ipallocationdhcp

Kea DHCP error: conflicting reservation for address 192.168.1.2 with existing lease Address - how to clear the lease?


I am running ISC Kea DHCP server with a reservation of 192.168.1.2 for a MAC aa.bb.cc.dd.ee.ff.

Client successfully obtained IP 192.168.1.2, but after rebooting it is not getting the IP anymore and the Kea log file states conflicting reservation for address 192.168.1.2 with existing lease Address: 192.168.1.2, so it looks like it fails to recognize that the DHCPREQUEST is coming from the MAC for which the IP is reserved and to which the IP has already been issued.

This looks to me like it may be a bug.

How do I 'clear' that lease from the leases list?


Solution

  • When there is no reservation for the client, Kea will allocate an address from anywhere in the pool. Kea does not check that the selected address is not reserved. To solve this, the pool ranges and the reserved addresses must not overlap. For example:

        {
            "subnet": "10.3.0.0/16",
            "pools": [ { "pool": "10.3.64.0 - 10.3.95.252" } ],
            "reservations": [
                { "hw-address": "xx:xx:xx:xx:xx:xx", "ip-address": "10.3.0.1" },
                { "hw-address": "xx:xx:xx:xx:xx:xx", "ip-address": "10.3.1.1" },
                { "hw-address": "xx:xx:xx:xx:xx:xx", "ip-address": "10.3.2.1" }
            ]
        },