[Kea-users] libdhcp_subnet_cmds and database insert
Marcin Jurczuk
spock at omegastar.eu
Wed Nov 19 15:36:01 UTC 2025
Thank You for update.
Unfortunately for me libdhcp_cb_cmds.so is paid hook so it seems there is
no way to add subnet to db via API without subscription.
Manual SQL insert with audit log, server tag, etc works, but I wanted to
avoid database schema change in the future.
Thanks
Marcin
On Wed, Nov 19, 2025 at 16:16 Darren Ankney <darren.ankney at gmail.com> wrote:
> Hi,
>
> One more update, it should be noted that the libdhcp_subnet_cmds.so
> (
> https://kea.readthedocs.io/en/stable/arm/hooks.html#libdhcp-subnet-cmds-so-subnet-commands-to-manage-subnets-and-shared-networks
> )
> hook is incompatible with the configuration backend and cannot be used
> to alter the subnet configuration anywhere but in memory (written out
> to the configuration file with a subsequent config-write call). This
> is noted here:
> https://kea.readthedocs.io/en/stable/arm/config.html#incompatible-software
>
> Thank you,
> Darren Ankney
>
> On Wed, Nov 19, 2025 at 9:45 AM Darren Ankney <darren.ankney at gmail.com>
> wrote:
> >
> > Hello,
> >
> > Using the configuration backend
> > (https://kea.readthedocs.io/en/stable/arm/dhcp6-srv.html#dhcp6-cb)
> > requires loading two hooks:
> >
> > - libdhcp_cb_cmds.so
> > (
> https://kea.readthedocs.io/en/stable/arm/hooks.html#libdhcp-cb-cmds-so-configuration-backend-commands
> )
> > which provides the API commands necessary to manage the configuration
> > in the database.
> > - and one of libdhcp_mysql.so
> > (
> https://kea.readthedocs.io/en/stable/arm/hooks.html#libdhcp-mysql-so-database-backend-for-mysql
> )
> > or libdhcp_pgsql.so
> > (
> https://kea.readthedocs.io/en/stable/arm/hooks.html#libdhcp-pgsql-so-database-backend-for-postgresql
> )
> > depending on which database server software you use.
> >
> > Thank you,
> > Darren Ankney
> >
> > On Tue, Nov 18, 2025 at 6:44 PM Marcin Jurczuk <spock at omegastar.eu>
> wrote:
> > >
> > > Hi,
> > > I read basically all documentation about libdhcp_subnet_cmds hook and
> I still can't figure out how to force system to puth subnet config to
> database.
> > > hosts_cmds have this option called "operation-target" that allows you
> to define where config should be stored. It is not mentioned in subnet hook.
> > > I'm able to insert network to config file(after API call to write cfg)
> but not to db.
> > > What is operation-target equivalent or how force kea do save subnet to
> database.
> > >
> > > Thanks in advance.
> > > --
> > > 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
> --
> 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
> <https://lists.isc.org/mailman/listinfo/kea-users.Kea-users@lists.isc.org>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20251119/d58fb45c/attachment-0001.htm>
More information about the Kea-users
mailing list