Hello,

I also tried like this:

{
        "name": "bookworm",
        "boot-file-name": "ifelse(option[client-system].hex == 0x0000
or option[client-system].hex == 0x0006, '/linf/bookworm/boot/current-
amd64/pxelinux.0', '/linf/bookworm/boot/current-amd64/syslinux.efi')"
      }

But unfortunately, as I already had suspected, kea interprets the whole
"ifelse ... syslinux.efi')" string as the filename (and then complains
that it is to long)- Is it possible, probably by another syntax, to
tell kea that it is an expression? 

Regards
  Christoph

Am Freitag, dem 30.05.2025 um 11:38 -0400 schrieb Darren Ankney:
> Hi Christoph,
> 
> Assuming each client had a "host" entry in ISC DHCP, you could
> leverage this to add clients to a different class based on which
> eventual file you want to send.  For example:
> 
> "reservations": [
>         {
>             "hw-address": "aa:bb:cc:dd:ee:ff",
>             "client-classes": [ "bookworm"]
>         }
> ],
> "client-classes": [
>   {
>     "name": "bookworm"
>   },
>   {
>     "name": "pxe-system-type-00:00",
>     "test": "(option[123].hex == '00:00') and (member('bookworm'))",
>     "boot-file-name": "/linf/bookworm/boot/current-amd64/pxelinux.0"
>   }
> ]
> 
> Please review this documentation for further details:
> - https://kea.readthedocs.io/en/latest/arm/classify.html
> - 
> https://kea.readthedocs.io/en/latest/arm/dhcp4-srv.html#host-reservations-in-dhcpv4
> 
> Thank you,
> Darren Ankney
> 
> On Fri, May 30, 2025 at 9:15 AM Christoph Pleger
> <christoph.ple...@cs.tu-dortmund.de> wrote:
> > 
> > Hello,
> > 
> > > In Kea, you could use class membership as a proxy for groups.  For
> > > example, this:
> > > 
> > > Would be setup in Kea as four classes with different test lines for
> > > the pxe-system-type and value.  For example something like:
> > > 
> > > "client-classes": [
> > >   {
> > >     "name": "pxe-system-type-00:00",
> > >     "test": "option[123].hex == '00:00'",
> > >     "boot-file-name": "/linf/bookworm/boot/current-amd64/pxelinux.0"
> > >   }
> > > ]
> > 
> > 
> > That does it for the last component of boot-file-name, syslinux.efi or
> > pxelinux.0, but how about the second component, bullseye or bookworm in
> > my example, which does not depend on anything the client sends in its
> > dhcp request, but only on which OS version I want to run on the DHCP
> > Client?
> > 
> > Regards
> >   Christoph
> > --
> > 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@lists.isc.org
> > https://lists.isc.org/mailman/listinfo/kea-users

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
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@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users

Reply via email to