[Kea-users] Kea DHCPv6 Bulk Leasequery Relay-ID

Darren Ankney darren.ankney at gmail.com
Fri Sep 6 09:32:43 UTC 2024


Hi Mark,

Two questions:

1. Are you using Kea 2.6.1 ? I think the relay-id method was not
available before 2.6
2. Have you globally set "store-extended-info": true ? (see:
https://kea.readthedocs.io/en/kea-2.6.1/arm/dhcp6-srv.html#storing-extended-lease-information)
as this is required as well.  It doesn't appear so from the lease you
pasted as I don't see any data in the "user-context" field.

Thank you,
Darren Ankney

On Wed, Aug 28, 2024 at 3:23 PM Mark Blackford <mblackford at agn.tech> wrote:
>
> 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
>
> --
> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
>
> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
>
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users


More information about the Kea-users mailing list