[Kea-users] KEA DHCP4 client classes with mysql

James Jalbert jjalbert at rsu39.org
Mon Feb 9 11:58:25 UTC 2026


So I have to add the reservation with the command? I have added it with the
mysql commands with the same info
James Jalbert
Network Administrator
Eastern Aroostook RSU #39
Phone: 207-493-4246 Ext 1275




On Sat, Feb 7, 2026 at 7:32 AM Darren Ankney <darren.ankney at gmail.com>
wrote:

> Hi James,
>
> You will need a hosts_database that specifies mysql as shown here:
>
> https://kea.readthedocs.io/en/kea-3.0.2/arm/dhcp4-srv.html#dhcpv4-hosts-database-configuration
> something like this:
>
> ```
>     "hosts-databases": [
>       {
>         "name": "kea",
>         "password": "kea",
>         "type": "mysql",
>         "user": "kea"
>       }
>     ]
> ```
> You will only need to load libdhcp_myslq.so, libdhcp_hosts_cmds.so,
> for this specific purpose.  For a global host reservation, you need to
> set "reservations-global": true as described here:
>
> https://kea.readthedocs.io/en/kea-3.0.2/arm/dhcp4-srv.html#fine-tuning-dhcpv4-host-reservation
>
> To add such a reservation (global) using host_cmds, you need to send
> the reservation-add API command to Kea using subnet-id 0 as described
> here:
> https://kea.readthedocs.io/en/kea-3.0.2/arm/hooks.html#the-reservation-add-command
>
> Something like this:
> ```
> {
>     "command": "reservation-add",
>     "arguments": {
>         "reservation": {
>             "subnet-id": 0,
>             "hw-address": "1a:1b:1c:1d:1e:1f",
>             "ip-ddress": "192.0.2.1",
>             "client-classes": [ "classa" ]
>         }
>     }
> }
> ```
>
> After all of that, Kea should be able to find your reservation.
>
> Thank you,
> Darren Ankney
>
>
> On Thu, Feb 5, 2026 at 8:05 AM James Jalbert via Kea-users
> <kea-users at lists.isc.org> wrote:
> >
> > Hello, I hope this is the right list for this.....
> >
> > I am setting up the KEA DHCP4 server version 3.0.2 and trying to get
> client classes to work for my subnets. Here is what I have, and what has
> worked.
> >
> > I set up a global host reservation in the dhcp4.conf file. I set the
> host reservation with an ip address of one of my subnets and specify
> client_classes as the class name I want to use(we will say classa). In my
> subnet lists, I am setting a dynamic pool and telling the server, only give
> an address from this pool if the class = classa. With the client class set
> on the reservation, the machine gets an address, exactly what I want.
> >
> > Now I am trying to move the host reservation to mysql, as I have
> thousands of reservations. However, when I put "classa" under the
> dhcp4_client_classes it is not passed on to the server when the client
> requests its ip address. I get a message on the server that says failed to
> allocate address for client with classes ALL, Vendor_Class......., and
> UNKNOWN
> >
> > Why is the class not being sent from the database to the server?
> > I have loaded the libdhcp_classes_cmds.so, libdhcp_myslq.so,
> libdhcp_hosts_cmds.so, libdhcp_subnet_cmds.so libraries. Anyone have any
> thoughts?
> >
> > Thanks for any help.
> > James Jalbert
> > Network Administrator
> > Eastern Aroostook RSU #39
> > Phone: 207-493-4246 Ext 1275
> >
> >
> >
> > "This is a staff email account managed by rsu39.org. This email and any
> files transmitted with it are confidential. They are intended solely for
> the use of the individual or entity to whom they are addressed. If you have
> received this email in error please notify the sender."
> > --
> > 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>
>

-- 
*"This is a staff email account managed by rsu39.org <http://rsu39.org>. 
This email and any files transmitted with it are confidential. They are 
intended solely for the use of the individual or entity to whom they are 
addressed. If you have received this email in error please notify the 
sender."*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20260209/c2942763/attachment.htm>


More information about the Kea-users mailing list