[Kea-users] IP lease based only on host reservation database

Stas Starikevich stas.starikevich at gmail.com
Wed Apr 19 17:28:51 UTC 2017


Hello,

I found similar thread -
http://permalink.gmane.org/gmane.network.dhcp.isc.kea.user/53
Looks like 'reservations' or 'pool' is mandatory in current Kea version
(1.1), even if reservations set via the MySQL.

As a work-around I put 'false' reservation in the config like this:


  "subnet4": [
  {
  "subnet": "10.5.204.0/24",
       "reservations": [
         {
             "hw-address": "00:11:22:33:44:55",
             "ip-address": "1.2.3.4"
         },
       ]
       }
  ]
},

MySQL reservations & PXE still works, I added them via:

START TRANSACTION;
SET @ipv4_reservation='10.10.10.76';
SET @hostname = 'hostname.freebsd';
SET @identifier_type='hw-address';
SET @identifier_value='d4:ae:52:a7:ec:11';
SET @dhcp4_subnet_id=1;
SET @next_server='10.10.10.254';
SET @server_hostname='serverhostname.freebsd';
SET @boot_file_name='gpxelinux.0';

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

COMMIT;



Also I with incorrect work when DNS options get added (
http://kea.isc.org/wiki/HostReservationsHowTo example), but I will post
results of this in the separate thread.

Thanks.

Stas

On Wed, Apr 19, 2017 at 12:09 PM, Stas Starikevich <
stas.starikevich at gmail.com> wrote:

> Hello Francis,
>
> Can you please provide more details about this with config examples?
>
> Stas
>
> On Tue, Apr 18, 2017 at 12:13 AM, Francis Dupont <fdupont at isc.org> wrote:
>
>> Stas Starikevich writes:
>> > Can someone suggest a way to serve only white-listed (with host
>> reservation)
>> > clients?
>> > I.e. if client is not in the 'hosts' table then it shouldn't not get
>> any leas
>> > es (and boot from the HDD, but not from PXE).
>>
>> => did you try with no pool?
>>
>> Regards
>>
>> Francis Dupont <fdupont at isc.org>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20170419/0fa22295/attachment.htm>


More information about the Kea-users mailing list