[Kea-users] Storing host reservation in custom database
Marcin Romanowski
marcin at nicram.net
Sun May 31 08:04:25 UTC 2020
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" as subnet?
How could I return data in my view to be proper format for kea?
Best regards
MarcinR
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20200531/99b5c968/attachment.htm>
More information about the Kea-users
mailing list