[Kea-users] Kea DHCPv6 Bulk Leasequery Relay-ID
Darren Ankney
darren.ankney at gmail.com
Fri Sep 13 10:29:56 UTC 2024
Hello Mark,
Please can you upload your full configuration here (with any sensitive
parts redacted)?
Thank you,
Darren Ankney
On Wed, Sep 11, 2024 at 2:43 PM Mark Blackford <mblackford at agn.tech> wrote:
> Hello Darren,
>
>
>
> I re-tested the BLQ from Kea last week to a Juniper Gateway router, and
> while the IA_NA and IA_PD DUID leases were found this time, the actual
> DHCPv6 Type (15) Leasequery-reply packets are undecodable.
>
>
>
> I was taking packet captures at the time and wireshark agrees:
>
> 1) The IA Address (Type 5) response, Wireshark claims “Trailing Stray
> Characters”
>
> 2) The IA Prefix (Type 26) response, Wireshark claims “Malformed Packet”
>
>
>
> I have attached the following for the packets:
>
> 1. Detailed BLQ Kea Log for the transaction
>
> 2. PCAPs take at the Kea Server
>
> 3. The Kea DHCP Lease File (From today)
>
> 4. The Snippet of the Juniper Decode
>
>
>
> I forgot to get the leases file on Friday, but this is a lab with only 1
> unit. I attached the file from today which looks to have the same
> information.
>
>
>
> It looks like the info that is needed to restore the lease is there, but I
> don’t know how to stop the packets being malformed.
>
>
>
> Thank,
>
> [image: Logo] <http://www.alchemy-global.net/>
>
> *Mark Blackford*
>
> Network Engineer
>
> 678-230-8769
>
> mblackford at agn.tech
>
>
>
>
>
> *From: *Kea-users <kea-users-bounces at lists.isc.org> on behalf of Mark
> Blackford <mblackford at agn.tech>
> *Date: *Friday, September 6, 2024 at 9:02 AM
> *To: *Kea user's list <kea-users at lists.isc.org>
> *Subject: *Re: [Kea-users] Kea DHCPv6 Bulk Leasequery Relay-ID
>
> Hello Darren,
>
>
>
> Thank you very much for your reply and correcting this issue.
>
>
>
> 1) I was aware of the 2.6 requirement and re-installed everything from
> scratch a little over a month ago.
>
> [root at dhcp-test ~]# kea-dhcp4 -v
>
> 2.6.1
>
> [root at dhcp-test ~]# kea-dhcp6 -v
>
> 2.6.1
>
>
>
> 2) However, I have been following this link:
>
>
> https://kea.readthedocs.io/en/kea-2.6.0/arm/hooks.html#bulk-leasequery-configuration
>
>
>
> Which indicated to me that the option “extended-info-tables-enabled” would
> have provided the same functionality. However, as you pointed out, there
> was no relay ID in the lease table.
>
>
>
> I have since added the global parameter "store-extended-info" as you
> suggested, and I now see the JSON now at the end of each memfile lease. I
> hope this helps anyone trying to accomplish the same thing.
>
> [image: Logo] <http://www.alchemy-global.net/>
>
> *Mark Blackford*
>
> Network Engineer
>
> 678-230-8769
>
> mblackford at agn.tech
>
>
>
>
>
> *From: *Kea-users <kea-users-bounces at lists.isc.org> on behalf of Darren
> Ankney <darren.ankney at gmail.com>
> *Date: *Friday, September 6, 2024 at 4:33 AM
> *To: *Kea user's list <kea-users at lists.isc.org>
> *Subject: *Re: [Kea-users] Kea DHCPv6 Bulk Leasequery Relay-ID
>
> 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
> --
> 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
> --
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20240913/376cc48e/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 47273 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20240913/376cc48e/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 47273 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20240913/376cc48e/attachment-0003.png>
More information about the Kea-users
mailing list