[Kea-users] Where to put data for kea.

Darren Ankney darren.ankney at gmail.com
Wed Jan 10 10:48:15 UTC 2024


Hello Albert,

Database usage is not required, and is only a matter of convenience.
Reservations may be stored inside the json configuration file
(https://kea.readthedocs.io/en/kea-2.4.0/arm/dhcp4-srv.html#host-reservations-in-dhcpv4).
Please note that, unlike ISC DHCP, it is not recommended to assign IP
addresses at the global level, even though it is possible to do.
There should be a reservation section inside each subnet that contains
reservations relevant to that subnet.  You can use the include
directive (https://kea.readthedocs.io/en/kea-2.4.0/arm/config.html#configuration-files-inclusion)
to include external files so that you don't have to store all of the
reservations in one file.

There are API calls that you might be interested in, however, since
you are using software to generate these configuration files.  To
access host reservation specific API calls, you would need to purchase
premium hooks (https://kea.readthedocs.io/en/kea-2.4.0/arm/hooks.html#libdhcp-host-cmds-so-host-commands).
But still the database is not required here, just be sure and use
"operation-target": "memory".  Then perform a config-write
(https://kea.readthedocs.io/en/kea-2.4.0/arm/ctrl-channel.html#the-config-write-command).
This method would not allow storing reservations in a separate file,
however, they would all be in one configuration (json) file along with
the rest of the configuration.  Also, config-write will make your
initial hand written configuration larger by exposing lots of default
values.

Thank you,

Darren Ankney

On Wed, Jan 10, 2024 at 3:13 AM Albert Shih <Albert.Shih at obspm.fr> wrote:
>
> Hi,
>
> We using isc for long time. 99% of the address give by isc-dhcp are «host
> reservation by mac address».
>
> So we manage a
>
> root at dhcp:/etc/dhcp# egrep "^\s+host" dhcpd.conf|wc
>    5821   17463  194735
> root at dhcp:/etc/dhcp#
>
> Currently we are working to migrate to Kea. But after reading lot of
> documentation I didn't find if I can use files to store the data. Or it's
> mandatory to use database to store those data.
>
> I find
>
>   https://kea.readthedocs.io/en/kea-2.4.1/arm/admin.html#supported-backends
>
> where they say it's not supported for host reservation to use memfile and
> as I understand the doc the data should be in the database
>
> But in
>
>   https://kb.isc.org/docs/what-are-host-reservations-how-to-use-them
>
> they seem to have json format file for host reservation.
>
> I understand it's not very efficient to use file, much better to use
> database but currently we have lot of script to generate those file, it
> would be easier for us to adapt them to generated json.
>
> So my question are : Can I put host reservation in file on the filesystem
> of the server ?
>
> Regards
> --
> Albert SHIH 🦫 🐸
> France
> Heure locale/Local time:
> mer. 10 janv. 2024 09:02:07 CET
> --
> 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 mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users


More information about the Kea-users mailing list