[Kea-users] Kea DHCPv6 Bulk Leasequery Relay-ID
Mark Blackford
mblackford at agn.tech
Wed Aug 28 19:22:56 UTC 2024
Hello,
I am trying to use the Bulk Leasequery feature of Kea DHCP6 to reload Gateway routers with delegated (or all) leases that have been lost due to either a reload or crash scenario. Since I want to reload thousands of IA_NA/IA_PD leases on demand, I expected to see a very clear “glue” between the relay ID and the target leases. But I do not and using default commands from my Juniper gateways is not resulting in any leases being returned.
My main question that I am struggling with is where do I find where the Relay-ID value is stored to properly query for leases tied to it since I do not even know if my relay-id is valid?
Based on 16.16.6. DHCPv6 Bulk Leasequery https://kea.readthedocs.io/en/kea-2.6.0/arm/hooks.html#dhcpv6-bulk-leasequery, I re-installed Kea to use a memfile lease backend to use those features.
My hook library config is below with logging turned to max:
"hooks-libraries": [
{
"library": "/usr/lib64/kea/hooks/libdhcp_lease_query.so",
"parameters": {
"requesters": [ "fc00:d2c0:10:170::2", "fc00:d2c0:10:170::3" ],
"advanced" : {
"bulk-query-enabled": true,
"active-query-enabled": false,
"extended-info-tables-enabled": true,
"lease-query-ip": "fc00:d2c0:10:170::23",
"lease-query-tcp-port": 547,
},
},
},
"loggers": [
{
"name": "kea-dhcp6.lease-query-hooks",
"severity": "DEBUG",
"debuglevel": 99,
"output_options": [
{
"output": "/var/log/kea/dhcp6-blq.log",
"maxver": 10
}
]
},
I see the bulk message come into the log file, but it also says there are no leases when I know there is at least 1 test lease (IA_NA/IA_PD):
[root at dhcp-test ~]# cat /var/lib/kea/dhcp6.leases
address,duid,valid_lifetime,expire,subnet_id,pref_lifetime,lease_type,iaid,prefix_len,fqdn_fwd,fqdn_rev,hostname,hwaddr,state,user_context,hwtype,hwaddr_source,pool_id
2001:db8:1580:255::100,00:03:00:01:b8:94:70:fb:20:6e,600,1724871654,1,600,0,1,128,0,0,resgw,b8:94:70:fb:20:6e,0,,1,2,0
2001:db8:8000::,00:03:00:01:b8:94:70:fb:20:6e,600,1724871654,1,600,2,1,56,0,0,resgw,b8:94:70:fb:20:6e,0,,1,2,0
But the BLQ Hook Log says there are “no active leases”:
2024-08-21 14:54:10.244 DEBUG [kea-dhcp6.lease-query-hooks/1319.140527284262464] BULK_LEASE_QUERY_QUERY_RECEIVED A bulk lease query packet received from fc00:d2c0:10:170::3, details: local_address=[::]:0, remote_address=[fc00:d2c0:10:170::3]:53751,
msg_type=LEASEQUERY (14), trans_id=0xeda378,
options:
type=00001, len=00031: 00:02:00:00:05:83:01:66:34:3a:62:66:3a:61:38:3a:33:39:3a:63:65:3a:32:30:00:00:00:00:00:00:00
type=00044, len=00072: 3 (uint8) :: (ipv6-address),
options:
type=00006, len=00016: 18(uint16) 37(uint16) 47(uint16) 15(uint16) 16(uint16) 12(uint16) 100(uint16) 79(uint16)
type=00053, len=00031: 00:02:00:00:05:83:01:66:34:3a:62:66:3a:61:38:3a:33:39:3a:63:65:3a:32:30:00:00:00:00:00:00:00
No relays traversed.
2024-08-21 14:54:10.244 DEBUG [kea-dhcp6.lease-query-hooks/1319.140527284262464] BULK_LEASE_QUERY_RESPONSE_SENT A bulk lease query response sent to fc00:d2c0:10:170::3, details: local_address=[::]:0, remote_address=[fc00:d2c0:10:170::3]:53751,
msg_type=LEASEQUERY_REPLY (15), trans_id=0xeda378,
options:
type=00001, len=00031: 00:02:00:00:05:83:01:66:34:3a:62:66:3a:61:38:3a:33:39:3a:63:65:3a:32:30:00:00:00:00:00:00:00
type=00002, len=00014: 00:01:00:01:2d:90:6d:83:00:50:56:be:a7:9a
type=00013, len=00018: Success(0) "no active leases"
No relays traversed.
I believe this is a crucial feature for anyone launching IPv6 with Prefix Delegation. Has anyone seen this feature work using relay-id? How did you know which one to use?
Thanks,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20240828/590d08f2/attachment.htm>
More information about the Kea-users
mailing list