<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Darren,</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks you for the response. Unfortunately this did not work, still no options are sent if both are defined. It also would not scale above two entries which is problematic with multiple PXE client versions. What I'm trying to replicate is the "if" statements
 in the now old isc-dhcp server:</div>
<pre><blockquote style="margin-left: 0.8ex; padding-left: 1ex; border-left: 3px solid rgb(200, 200, 200);"><pre><div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">            if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00006" {
                filename "i386-efi/ipxe.efi";
            }

            if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00002" {
                filename "i386-efi/ipxe.efi";
            }

            if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00007" {
                filename "ipxe.efi";
            }
</div></pre></blockquote><div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Do you know if this is possible with Kea at this moment? Or through a hook?</div><div style="white-space: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br></div><div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Thanks,</div></pre>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Isaac</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Kea-users <kea-users-bounces@lists.isc.org> on behalf of Darren Ankney <darren.ankney@gmail.com><br>
<b>Sent:</b> Tuesday, January 14, 2025 2:24 PM<br>
<b>To:</b> Kea user's list <kea-users@lists.isc.org><br>
<b>Subject:</b> [External] - Re: [Kea-users] Option Class-Tagging Configuration</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi Isaac,<br>
<br>
I have not yet experimented with the new "option class-tagging"<br>
feature, but I can guess that what is happening to you here is that<br>
the same name in the second option is causing the first option's data<br>
to be overwritten.  Perhaps try using the code for one of them instead<br>
of the name (not 100% sure that is a valid workaround).  The  code for<br>
'boot-file-name' seems to be 67.  So replace "name": "boot-file-name"<br>
with "code": 67 in one of them perhaps?<br>
<br>
Thank you,<br>
Darren Ankney<br>
<br>
On Tue, Jan 14, 2025 at 2:20 PM Isaac Brummel <ibrummel@xes-inc.com> wrote:<br>
><br>
> Hello,<br>
><br>
> I'm trying to use the new "option class-tagging" feature from 2.7.4 to dynamically set boot-file-name to a different value for every subnet. I'm running into an issue where if I have two entries in the "option-data" one for legacy ipxe and one for EFI ipxe
 none get set, see the below config for an example. If I only set one such as only having the "ipxe_legacy" client class then it correctly sends the boot-file-name. Is there something I'm missing, or a better way to handle this?<br>
><br>
> "client-classes": [<br>
>     {<br>
>         "name": "ipxe_legacy",<br>
>         "test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00000'"<br>
>     },<br>
>     {<br>
>         "name": "ipxe_efi",<br>
>         "test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00007'"<br>
>     }<br>
> ],<br>
> "subnet4": [<br>
>     {<br>
>         "id": 1,<br>
>         "subnet": "10.10.10.0/24",<br>
>         "calculate-tee-times": true,<br>
>         "valid-lifetime": 60,<br>
>         "ddns-qualifying-suffix": "kea-dev.com",<br>
>         "client-classes": [],<br>
>         "option-data": [],<br>
>         "pools": [<br>
>             {<br>
>                 "pool": "10.10.10.100 - 10.10.10.150",<br>
>                 "option-data": [<br>
>                     {<br>
>                         "client-classes": [<br>
>                             "ipxe_legacy"<br>
>                         ],<br>
>                         "name": "boot-file-name",<br>
>                         "data": "ipxe/netboot.xyz.kpxe"<br>
>                     },<br>
>                     {<br>
>                         "client-classes": [<br>
>                             "ipxe_efi"<br>
>                         ],<br>
>                         "name": "boot-file-name",<br>
>                         "data": "ipxe/netboot.xyz.efi"<br>
>                     },<br>
>                     {<br>
>                         "name": "routers",<br>
>                         "data": "10.10.10.1"<br>
>                     },<br>
>                     {<br>
>                         "name": "domain-name-servers",<br>
>                         "data": "10.10.10.1, 10.10.10.2"<br>
>                     }<br>
>                 ]<br>
>             }<br>
>         ]<br>
>     }<br>
> ]<br>
><br>
> Thanks,<br>
><br>
> Isaac Brummel<br>
> System Administrator<br>
> Extreme Engineering Solutions<br>
> --<br>
> ISC funds the development of this software with paid support subscriptions. Contact us at
<a href="https://www.isc.org/contact/">https://www.isc.org/contact/</a> for more information.<br>
><br>
> To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users">
https://lists.isc.org/mailman/listinfo/kea-users</a>.<br>
><br>
> Kea-users mailing list<br>
> Kea-users@lists.isc.org<br>
> <a href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
--<br>
ISC funds the development of this software with paid support subscriptions. Contact us at
<a href="https://www.isc.org/contact/">https://www.isc.org/contact/</a> for more information.<br>
<br>
To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a>.<br>
<br>
Kea-users mailing list<br>
Kea-users@lists.isc.org<br>
<a href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.<br>
<br>
</div>
</span></font></div>
</body>
</html>