[Kea-users] Grouping host entries
Darren Ankney
darren.ankney at gmail.com
Fri May 30 12:53:59 UTC 2025
Hi Christoph,
In Kea, you could use class membership as a proxy for groups. For
example, this:
group {
if option pxe-system-type = 00:00 {
filename "/linf/bookworm/boot/current-amd64/pxelinux.0";
} elsif option pxe-system-type = 00:09 {
filename "/linf/bookworm/boot/current-amd64/syslinux.efi";
} elsif option pxe-system-type = 00:07 {
filename "/linf/bookworm/boot/current-amd64/syslinux.efi";
} elsif option pxe-system-type = 00:06 {
filename "/linf/bookworm/boot/current-amd64/pxelinux.0";
}
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"
}
]
Where 123 is the option number of "pxe-system-type". Repeat for the
other cases in the group shown.
Thank you,
Darren Ankney
On Fri, May 30, 2025 at 8:17 AM Christoph Pleger
<Christoph.Pleger at cs.tu-dortmund.de> wrote:
>
> Hello,
>
> in ISC DHCP Server, I used the group{} to group host entries, like this:
>
> group {
> if option pxe-system-type = 00:00 {
> filename "/linf/bullseye/boot/current-amd64/pxelinux.0";
> } elsif option pxe-system-type = 00:09 {
> filename "/linf/bullseye/boot/current-amd64/syslinux.efi";
> } elsif option pxe-system-type = 00:07 {
> filename "/linf/bullseye/boot/current-amd64/syslinux.efi";
> } elsif option pxe-system-type = 00:06 {
> filename "/linf/bullseye/boot/current-amd64/pxelinux.0";
> }
>
> option root-path "/linf/bullseye/nfsroot/current-amd64";
>
> host mud1 {
> hardware ethernet 00:1b:21:41:6a:69;
> fixed-address 129.217.28.120;
> option host-name "mud1";
> }
>
> host mud2 {
> hardware ethernet 00:1b:21:41:6a:6d;
> fixed-address 129.217.28.121;
> option host-name "mud2";
> }
> }
>
> group {
> if option pxe-system-type = 00:00 {
> filename "/linf/bookworm/boot/current-amd64/pxelinux.0";
> } elsif option pxe-system-type = 00:09 {
> filename "/linf/bookworm/boot/current-amd64/syslinux.efi";
> } elsif option pxe-system-type = 00:07 {
> filename "/linf/bookworm/boot/current-amd64/syslinux.efi";
> } elsif option pxe-system-type = 00:06 {
> filename "/linf/bookworm/boot/current-amd64/pxelinux.0";
> }
>
> option root-path "/linf/bookworm/nfsroot/current-amd64";
>
> host mud3 {
> hardware ethernet 00:1b:21:41:6a:46;
> fixed-address 129.217.28.122;
> option host-name "mud3";
> }
>
> host mud4 {
> hardware ethernet 00:1b:21:41:6a:47;
> fixed-address 129.217.28.123;
> option host-name "mud4";
> }
> }
>
> As you can see, the reason why I used different groups is that every
> group needs its own boot file names and root path. The boot file name
> does not only depend on the group, but also on the dhcp client-system
> option.
>
> How can I create host groups like this in KEA?
>
> 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 at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users
More information about the Kea-users
mailing list