kea dhcp option for debian preseed file

Started by cybermcm, May 09, 2026, 05:14:43 PM

Previous topic - Next topic
hello,
 I recently switched to kea and was able to use my debian preseed file with the following option in 'manual config mode'
        "client-classes": [
            {
            "name": "deb-preseed",
            "test": "substring(option[vendor-class-identifier].text,0,3) == 'd-i'",
            "boot-file-name": "https://xyz.net/preseed.cfg"
            }
        ],
I noticed that it is now possible to set options via gui but it doesn't work for me.
I tried option 124 with hex code 642d69 for (d-i), see screenshot but if I set this option and inspect kea-dhcp4.conf it only shows
"client-classes": [
            {
                "name": "22e436d9-2826-445b-ab48-d7b68058ca8f",
                "test": "option[124].hex == 0x642D69"
            }
        ]

Any ideas?

You also have to attach the option to a subnet scope. Check this documentation:

https://docs.opnsense.org/manual/kea.html#dhcp-options
Hardware:
DEC740

Thank you for your fast answer!
I tried this but it still doesn't work. I tried the example from the docs, this is working (providing a TFTP boot file), but the specific option for the debian installer does not (tried with option 60,43,124)
Maybe the fact that with a manual config only a substring is checked?
substring(option[vendor-class-identifier].text,0,3)
Anyone who already solved this?

May 10, 2026, 11:28:00 AM #3 Last Edit: May 10, 2026, 11:33:18 AM by Monviech (Cedrik)
Ah I see you need a slightly different test. Thats not currently supported in the GUI. (And probably won't be supported since that opens pandoras box of complexity, Kea's classification language is deceptively deep.)

All tests are matching the data of an option exactly. Try to find an exact matching test that can match your clients with the available DHCP options.

If there is notjing available that fits your need Im afraid you have to continue using the manual config.
Hardware:
DEC740

I did some more digging and from my point of view the substring part isn't the problem. I did a trace and I figured out that option 60 is exactly 'd-i'. I think the problem is that with my working manual config the return value from kea is only 'Boot file name: https://xyz.net/preseed.cfg'; but not as an actual DHCP option. Is this doable with the GUI settings, provide a 'boot file name' if option 60 is 'd-i'?

Today at 09:50:01 PM #5 Last Edit: Today at 09:55:53 PM by Monviech (Cedrik)
Isnt boot file name just option 67?

Why doesn't the docs example work for you?

It's a string, you can also input your full URL in there.

Inside the config file you will always see hex since it will be converted when written into the configuration (GUI shows the string, config shows that string as hex)

Does that debian installer only react to the legacy  "BOOTP header file field" and not to the standard option 67?
Hardware:
DEC740

I tried it with option 67 as string and also converted to hex. But the string doesn't get send to the client with the GUI setting whereas with the manual config it works.

Today at 10:07:14 PM #7 Last Edit: Today at 10:16:58 PM by Monviech (Cedrik)
Well there is a difference between:
- BOOTP
and
- Option 67

BOOTP comes from a time where DHCP options have not yet existed standardized.

Its weird that Debian doesnt take a normal DHCP option and prefers the legacy BOOTP file.

Since its not a DHCP option, it's not available in the new DHCP option framework that we built.
Hardware:
DEC740