<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Aptos;
        panose-1:2 11 0 4 2 2 2 2 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:502084754;
        mso-list-type:hybrid;
        mso-list-template-ids:-344693486 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1
        {mso-list-id:1890847655;
        mso-list-template-ids:-1881385202;}
@list l1:level1
        {mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level2
        {mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level3
        {mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level4
        {mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level5
        {mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level6
        {mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level7
        {mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level8
        {mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level9
        {mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l2
        {mso-list-id:2088501417;
        mso-list-type:hybrid;
        mso-list-template-ids:547277950 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l2:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l2:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l2:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l2:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l2:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l2:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l2:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l2:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l2:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hello Darren,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thank you very much for your reply and correcting this issue.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">1) I was aware of the 2.6 requirement and re-installed everything from scratch a little over a month ago.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">[root@dhcp-test ~]# kea-dhcp4 -v<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">2.6.1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">[root@dhcp-test ~]# kea-dhcp6 -v<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">2.6.1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">2) However, I have been following this link:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><a href="https://kea.readthedocs.io/en/kea-2.6.0/arm/hooks.html#bulk-leasequery-configuration">https://kea.readthedocs.io/en/kea-2.6.0/arm/hooks.html#bulk-leasequery-configuration</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">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.<o:p></o:p></span></p>
<div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="480" style="width:5.0in;background:white;border-collapse:collapse">
<tbody>
<tr>
<td width="160" valign="top" style="width:120.0pt;padding:7.5pt 0in 9.0pt 0in">
<p class="MsoNormal"><span style="color:black"><a href="http://www.alchemy-global.net/" target="_blank" title="http://www.alchemy-global.net/"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#337AB7;text-decoration:none"><img border="0" width="141" height="141" style="width:1.4687in;height:1.4687in" id="Picture_x0020_1" src="cid:image001.png@01DB0037.1100D4B0" alt="Logo"></span></a></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
</td>
<td width="320" style="width:240.0pt;padding:4.5pt 0in 4.5pt 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
<tbody>
<tr>
<td width="320" style="width:239.8pt;padding:0in 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Arial",sans-serif;color:#3D3C3F">Mark Blackford</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
</td>
</tr>
<tr>
<td width="320" style="width:239.8pt;padding:0in 0in 8.25pt 0in">
<p class="MsoNormal" style="line-height:13.8pt"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#3D3C3F">Network Engineer</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
</td>
</tr>
<tr>
<td width="320" style="width:239.8pt;padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#595959">678-230-8769</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal"><a href="mailto:mblackford@agn.tech"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#467886">m</span><span style="font-size:11.0pt;color:#467886">blackford</span><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#467886">@a</span><span style="font-size:11.0pt;color:#467886">gn.tech</span></a><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="color:black">From:
</span></b><span style="color:black">Kea-users <kea-users-bounces@lists.isc.org> on behalf of Darren Ankney <darren.ankney@gmail.com><br>
<b>Date: </b>Friday, September 6, 2024 at 4:33</span><span style="font-family:"Arial",sans-serif;color:black"> </span><span style="color:black">AM<br>
<b>To: </b>Kea user's list <kea-users@lists.isc.org><br>
<b>Subject: </b>Re: [Kea-users] Kea DHCPv6 Bulk Leasequery Relay-ID<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Hi Mark,<br>
<br>
Two questions:<br>
<br>
1. Are you using Kea 2.6.1 ? I think the relay-id method was not<br>
available before 2.6<br>
2. Have you globally set "store-extended-info": true ? (see:<br>
</span><a href="https://kea.readthedocs.io/en/kea-2.6.1/arm/dhcp6-srv.html#storing-extended-lease-information)"><span style="font-size:11.0pt">https://kea.readthedocs.io/en/kea-2.6.1/arm/dhcp6-srv.html#storing-extended-lease-information)</span></a><span style="font-size:11.0pt"><br>
as this is required as well.  It doesn't appear so from the lease you<br>
pasted as I don't see any data in the "user-context" field.<br>
<br>
Thank you,<br>
Darren Ankney<br>
<br>
On Wed, Aug 28, 2024 at 3:23</span><span style="font-size:11.0pt;font-family:"Arial",sans-serif"> </span><span style="font-size:11.0pt">PM Mark Blackford <mblackford@agn.tech> wrote:<br>
><br>
> Hello,<br>
><br>
><br>
><br>
> 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.<br>
><br>
><br>
><br>
> 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?<br>
><br>
><br>
><br>
> Based on 16.16.6. DHCPv6 Bulk Leasequery </span><a href="https://kea.readthedocs.io/en/kea-2.6.0/arm/hooks.html#dhcpv6-bulk-leasequery"><span style="font-size:11.0pt">https://kea.readthedocs.io/en/kea-2.6.0/arm/hooks.html#dhcpv6-bulk-leasequery</span></a><span style="font-size:11.0pt">,
 I re-installed Kea to use a memfile lease backend to use those features.<br>
><br>
><br>
><br>
> My hook library config is below with logging turned to max:<br>
><br>
><br>
><br>
>     "hooks-libraries": [<br>
><br>
>           {<br>
><br>
>               "library": "/usr/lib64/kea/hooks/libdhcp_lease_query.so",<br>
><br>
>               "parameters": {<br>
><br>
>                   "requesters": [ "fc00:d2c0:10:170::2", "fc00:d2c0:10:170::3" ],<br>
><br>
>                   "advanced" : {<br>
><br>
>                       "bulk-query-enabled": true,<br>
><br>
>                       "active-query-enabled": false,<br>
><br>
>                       "extended-info-tables-enabled": true,<br>
><br>
>                       "lease-query-ip": "fc00:d2c0:10:170::23",<br>
><br>
>                       "lease-query-tcp-port": 547,<br>
><br>
>                   },<br>
><br>
>               },<br>
><br>
>           },<br>
><br>
><br>
><br>
>     "loggers": [<br>
><br>
><br>
><br>
>       {<br>
><br>
>         "name": "kea-dhcp6.lease-query-hooks",<br>
><br>
>         "severity": "DEBUG",<br>
><br>
>         "debuglevel": 99,<br>
><br>
>         "output_options": [<br>
><br>
>           {<br>
><br>
>             "output": "/var/log/kea/dhcp6-blq.log",<br>
><br>
>             "maxver": 10<br>
><br>
>           }<br>
><br>
>         ]<br>
><br>
>       },<br>
><br>
><br>
><br>
> 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):<br>
><br>
><br>
><br>
> [root@dhcp-test ~]# cat /var/lib/kea/dhcp6.leases<br>
><br>
> 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<br>
><br>
> 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<br>
><br>
> 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<br>
><br>
><br>
><br>
> But the BLQ Hook Log says there are “no active leases”:<br>
><br>
><br>
><br>
> 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,<br>
><br>
> msg_type=LEASEQUERY (14), trans_id=0xeda378,<br>
><br>
> options:<br>
><br>
>   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<br>
><br>
>   type=00044, len=00072: 3 (uint8) :: (ipv6-address),<br>
><br>
> options:<br>
><br>
>     type=00006, len=00016: 18(uint16) 37(uint16) 47(uint16) 15(uint16) 16(uint16) 12(uint16) 100(uint16) 79(uint16)<br>
><br>
>     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<br>
><br>
> No relays traversed.<br>
><br>
><br>
><br>
> 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,<br>
><br>
> msg_type=LEASEQUERY_REPLY (15), trans_id=0xeda378,<br>
><br>
> options:<br>
><br>
>   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<br>
><br>
>   type=00002, len=00014: 00:01:00:01:2d:90:6d:83:00:50:56:be:a7:9a<br>
><br>
>   type=00013, len=00018: Success(0) "no active leases"<br>
><br>
> No relays traversed.<br>
><br>
><br>
><br>
> 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?<br>
><br>
><br>
><br>
> Thanks,<br>
><br>
> Mark<br>
><br>
> --<br>
> ISC funds the development of this software with paid support subscriptions. Contact us at
</span><a href="https://www.isc.org/contact/"><span style="font-size:11.0pt">https://www.isc.org/contact/</span></a><span style="font-size:11.0pt"> for more information.<br>
><br>
> To unsubscribe visit </span><a href="https://lists.isc.org/mailman/listinfo/kea-users"><span style="font-size:11.0pt">https://lists.isc.org/mailman/listinfo/kea-users</span></a><span style="font-size:11.0pt">.<br>
><br>
> Kea-users mailing list<br>
> Kea-users@lists.isc.org<br>
> </span><a href="https://lists.isc.org/mailman/listinfo/kea-users"><span style="font-size:11.0pt">https://lists.isc.org/mailman/listinfo/kea-users</span></a><span style="font-size:11.0pt"><br>
-- <br>
ISC funds the development of this software with paid support subscriptions. Contact us at
</span><a href="https://www.isc.org/contact/"><span style="font-size:11.0pt">https://www.isc.org/contact/</span></a><span style="font-size:11.0pt"> for more information.<br>
<br>
To unsubscribe visit </span><a href="https://lists.isc.org/mailman/listinfo/kea-users"><span style="font-size:11.0pt">https://lists.isc.org/mailman/listinfo/kea-users</span></a><span style="font-size:11.0pt">.<br>
<br>
Kea-users mailing list<br>
Kea-users@lists.isc.org<br>
</span><a href="https://lists.isc.org/mailman/listinfo/kea-users"><span style="font-size:11.0pt">https://lists.isc.org/mailman/listinfo/kea-users</span></a><span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>