[Kea-users] Host reservations in MySQL database
marcin at isc.org
Mon Nov 28 16:29:53 UTC 2016
On 09.11.2016 19:19, Christian Garling wrote:
> 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)
> dhcp4_subnet_id='1' (matches my subnet id in kea.conf)
> ipv4_address=INET_ATON('192.168.1.25') (reserved IP for the host to
> dhcp4_next_server=INET_ATON('192.168.1.10') (IP of my tftp server)
> dhcp4_server_hostname=INET_ATON('192.168.1.10') (IP of my tftp server
> again -> not sure if its correct)
> If the machine tries to PXE boot it does not get the reserved IP and it
> does not boot the PXE image. If I configure the same reservation in the
> kea.conf itself PXE boot works fine.
> 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 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.
> Can someone help with that?
> Regards, Christian
The dhcp4_server_hostname value is a null terminated string per
BOOTP/DHCPv4 specs and thus it should rather be specified as
'192.168.1.25', not as INET_ATON('192.168.1.25'). Though, it may still
not resolve the problem. The major question is whether the server gets
the reservation from the MySQL but what it provides to the PXE client
makes the client unhappy, or the server is unable to obtain a
reservation from the MySQL database. I am not clear about that from your
description. Could you share a log (debug) output from the Kea server?
Also, it would help if you could share the config file, the mysql-dump
of hosts MySQL table and the queries you observe between Kea and MySQL
If you don't feel like sharing it with a list, you're free to send it
More information about the Kea-users