Hello,
Now i'm trying to configure mysql host reservation. But no luck. Where could be
my mistake?
Here is my configurations:
"host-reservation-identifiers": [ "circuit-id", "hw-address", "flex-id" ],
"reservation-mode": "global",
"hosts-database": {
"type": "mysql",
"name": "kea",
"host": "",
"user": "myuser",
"password": "mypass"
},
"hooks-libraries": [
{
"library": "/usr/local/lib/hooks/libdhcp_flex_id.so",
"parameters": {
"identifier-expression": "concat(relay4[1].hex,
hexstring(pkt4.mac, ''))"
}
}
],
MySQL insert statement:
START TRANSACTION;
SET @ipv4_reservation='10.10.10.10;
SET @identifier_type='flex-id';
SET @identifier_value='4857544315C6342Fd4cff9ffddbb';
SET @dhcp4_subnet_id=1;
SET @next_server='10.10.10.1';
SET @server_hostname='kea.test.com';
SET @boot_file_name='bootfile.efi';
INSERT INTO hosts (dhcp_identifier,
dhcp_identifier_type,
dhcp4_subnet_id,
ipv4_address,
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),
INET_ATON(@next_server),
@server_hostname,
@boot_file_name);
COMMIT;
Kea Log:
INFO [kea-dhcp4.flex-id-hooks/17331] FLEX_ID_EXPRESSION_EVALUATED Expression
evaluated for packet to "4857544315C6342Fd4cff9ffddbb" (size: 28)
WARN [kea-dhcp4.alloc-engine/17331] ALLOC_ENGINE_V4_ALLOC_FAIL [hwtype=1
d4:cf:f9:ff:dd:bb], cid=[01:d4:cf:f9:ff:dd:bb], tid=0x55455494: failed to al
locate an IPv4 address after 0 attempt(s)
BR,
Agiimaa B.
________________________________
From: Kea-users <[email protected]> on behalf of TroYy
<[email protected]>
Sent: Thursday, November 21, 2019 5:51 PM
To: [email protected]
Subject: Re: [Kea-users] using flex_id for combined reservation identifiers
If your hook evaluated your expression as "4857544394969D21d4:cf:f9:ff:dd:bb"
then try to add reservation something like this
"reservations": [
{
"flex-id": "4857544394969D21d4:cf:f9:ff:dd:bb",
"ip-address": "10.215.160.101"
}
Also check if your flex-id identifier is enabled for quering:
"host-reservation-identifiers": ["duid", "*flex-id*"],
--
Sent from: http://kea-users.7364.n8.nabble.com/
Kea Users | Mailing List Archive<http://kea-users.7364.n8.nabble.com/>
kea-users.7364.n8.nabble.com
Kea Users forum and mailing list archive. Kea is an open source project from
Internet Systems Consortium (ISC). This list is for discussion about installing
and managing the Kea software suite for...
_______________________________________________
Kea-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-users
The information transmitted, including attachments, is intended only for the
person(s) or entity to which it is addressed and may contain confidential
and/or privileged material. Any review, re-transmission, dissemination or other
use of, or taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you received this
in error, please contact the sender and destroy any copies of this information.
-------------------------------------------------------------------------------------------------------------------------------------
Энэхүү и-мэйл болон хавсралт дахь мэдээлэл нь тодорхой хүнд хаяглагдсан бөгөөд
нууцлалтай мэдээлэл агуулж байж болзошгүй тул бусдад дамжуулах, олон нийтэд
тараах, өөр бусад зорилгоор ашиглахыг хориглоно. Хэрэв та уг и-мэйлийг
санамсаргүй байдлаар хүлээн авсан бол и-мэйл илгээгчид мэдэгдэж, хуулбар баримт
үлдээлгүй устгана уу.
_______________________________________________
Kea-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-users