[Kea-users] Storing host reservation in custom database
Dajka Tamás
viper at vipernet.hu
Sun May 31 11:22:45 UTC 2020
I think you should read the WHOLE documentation before trying to set up complex things.
For the SQL you’ll have to set up the schema first – see docs -, set up KEA to use MySQL not just for leases, but for hosts too (separate part in ipv4/6 config)
https://downloads.isc.org/isc/kea/1.7.7/doc/html/arm/admin.html <- start somewhere here
Cheers,
Tom
From: Kea-users [mailto:kea-users-bounces at lists.isc.org] On Behalf Of Marcin Romanowski
Sent: Sunday, May 31, 2020 1:06 PM
To: kea-users at lists.isc.org
Subject: Re: [Kea-users] Storing host reservation in custom database
I have found this documentation https://gitlab.isc.org/isc-projects/kea/-/wikis/docs/editing-host-reservations this what I was looking for.
But I cannot find information, how to configure the "hosts" table :( In my database I have that table name already so I can prepare view but this cannot be named 'hosts" but kea make SELECT on this table :(
niedz., 31 maj 2020 o 10:04 Marcin Romanowski <marcin at nicram.net <mailto:marcin at nicram.net> > napisał(a):
Hello,
I'd like to store dhcpv4 host reservations in my database which is currently in production. In documentation I've found, that I can create my own view and configure it as read-only.
In kea database schema there are columns in host table:
host_id SERIAL PRIMARY KEY NOT NULL,
dhcp_identifier BYTEA NOT NULL,
dhcp_identifier_type SMALLINT NOT NULL,
dhcp4_subnet_id INT DEFAULT NULL,
dhcp6_subnet_id INT DEFAULT NULL,
ipv4_address BIGINT DEFAULT NULL,
hostname VARCHAR(255) DEFAULT NULL,
dhcp4_client_classes VARCHAR(255) DEFAULT NULL,
dhcp6_client_classes VARCHAR(255) DEFAULT NULL
My question is about `dhcp_identifier` column and ipv4_address. This should be hw-address, duid corresponding to dhcp_identifier_type. In my database ipv4 address I store as ::inet.
dhcp4_subnet_id is integer. So I have to in config add subnet_id argument or I can return string for example "192.168.12.0/24 <http://192.168.12.0/24> " as subnet?
How could I return data in my view to be proper format for kea?
Best regards
MarcinR
--
Marcin Romanowski / nicraM
<https://docs.google.com/uc?export=download&id=1tF66ovI5kS7h-4bp0atR0UMIQMnsAEbm&revid=0B1o0UzQJ45KxQ3VhbEhEQ2szRXV6SEhaS1hpVmx6UWNxV2pFPQ>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20200531/64de0cc5/attachment.htm>
More information about the Kea-users
mailing list