Hello! I have a problem where host reservations are not pulled from the database.

This is how I installed Kea and setup mysql:

using this guide: https://kea.isc.org/wiki/SystemNotesOpenBSD

then added to kea.conf and created database with tables:

[...]"subnet": "10.0.0.0/24",
       "id": 1,[...]

 "lease-database": {
    "type": "mysql",
    "name": "kea",
    "host" : "",
    "user": "kea",
    "password": "kea"
  },

"hosts-database": {
    "type": "mysql",
    "name": "kea",
    "host" : "",
    "user": "kea",
    "password": "kea"
  },

It connects and adds leases to database:

2016-08-07 12:56:18.838 INFO [kea-dhcp4.dhcpsrv/21651] DHCPSRV_MYSQL_DB opening MySQL lease database: name=kea password=***** type=mysql universe=4 user=kea 2016-08-07 12:56:18.844 INFO [kea-dhcp4.dhcpsrv/21651] DHCPSRV_MYSQL_HOST_DB opening MySQL hosts database: name=kea password=***** type=mysql universe=4 user=kea

Added reservation:

START TRANSACTION;
SET @ipv4_reservation='10.0.0.150';
SET @hostname = 'test';
SET @identifier_type='hw-address';
SET @identifier_value='66:38:32:38:38:38';
SET @dhcp4_subnet_id=1;

INSERT INTO hosts (dhcp_identifier,
                   dhcp_identifier_type,
                   dhcp4_subnet_id,
                   ipv4_address,
                   hostname)
VALUES (UNHEX(REPLACE(@identifier_value, ':', '')),
        (SELECT type FROM host_identifier_type WHERE name=@identifier_type),
        @dhcp4_subnet_id,
        INET_ATON(@ipv4_reservation),
        @hostname);

COMMIT;

Client still uses old lease until reservation is added in kea.conf.

Is there something I'm missing? Thanks!
_______________________________________________
Kea-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-users

Reply via email to