[Kea-users] Host reservations in MySQL database

mrobti at insiberia.net mrobti at insiberia.net
Wed Nov 9 19:05:57 UTC 2016


On 2016-11-09 10:19, Christian Garling wrote:
> Hello,
> 
> I am setting up KEA as part of a provisioning system. Therefore I want
> to use host reservations with MySQL to realize PXE boot of my
> machines. My dataset consists of:
> 
> dhcp_identifier=x'ab12cd34ef56' (MAC address of the system in lower
> case letters withouts colons)

I'm still trying to make it work myself, but I think you have a problem 
here.  That should be a binary string:

dhcp_identifier = UNHEX(REPLACE('aa:bb:cc:dd:ee:ff', ':', ''))

> I did not find any format specification how to store the data above
> correctly in the database. Specially the dhcp_identifier could be
> wrong I think.

I found this:

https://kea.isc.org/wiki/HostReservationsHowTo

> I already enabled the MySQL general log and there I can see a lot of
> queries from the KEA server, so the database connections seems to be
> fine.

By the way, do you happen to know how to make MySQL log show the 
contents of the executed query? My log only shows the prepared format, 
even when executing:

Execute        SELECT host_id, dhcp_identifier, dhcp_identifier_type, 
dhcp4_subnet_id, dhcp6_subnet_id, ipv4_address, hostname, 
dhcp4_client_classes, dhcp6_client_classes FROM hosts WHERE 
dhcp4_subnet_id = ? AND dhcp_identifier_type = ?    AND dhcp_identifier 
= ?


More information about the Kea-users mailing list