[Kea-users] DHCPv4 lease reservation based on host name (option 12)

Chaigneau, Nicolas nicolas.chaigneau at capgemini.com
Thu Nov 19 17:15:02 UTC 2020


Hello,


I would like to implement the following feature with Kea :
Based on DHCPv4 option < host name > (12) provided by clients in DHCP requests, assign a reserved lease IP address.

Reading Kea documentation, I see that the < reservations > entries can have a < hostname > field.
However (if I understand correctly) this is not used as a matching criteria on the request, but rather as information to be provided in the response.
Can you confirm ?


If so, I think the < flex-id > commercial hook would be the solution to my requirement.
For example with the following configuration, I would be able to reserve the lease 10.0.0.7 to a client that provides < my.host > in DHCP option < host name > (12).
This IP address 10.0.0.7 would never be assigned to any other client.
Can you confirm this is correct ?


"Dhcp4": {
    "subnet4": [ { ...,
    "reservations": [
      {
        "flex-id": "my.host",
        "ip-address": "10.0.0.7"
      }
    ],
    } ], # end of subnet definitions
    "host-reservation-identifiers": ["flex-id"],
    "hooks-libraries": [
        {
            "library": "/path/libdhcp_flex_id.so",
            "parameters": {
                "identifier-expression": "option[12]"
            }
        }
    ]
}



Lastly, I would like to know if it is possible to obtain an evaluation version of the < flex-id > commercial hook, to perform some tests ?



Thanks for your answers. :)


Regards,
Nicolas.

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20201119/b965591c/attachment.htm>


More information about the Kea-users mailing list