[Kea-users] Need Help Overriding Standard Option in Kea DHCPv4
Doug Freed
dwfreed at isc.org
Tue Jun 24 19:36:58 UTC 2025
On 6/24/25 14:21, Dipesh Kayastha wrote:
> Hi Kea Dev Team,
>
> I’m migrating from ISC DHCP to Kea and encountered an issue when
> attempting to define a custom option using code 121. In ISC DHCP, I was
> able to define option 121 for custom use as follows:
>
> option custom-option-121 code 121 = array of integer 8;
>
> In Kea, when I try to replicate that using:
>
> "option-def": [
> {
> "name": "custom-option-121",
> "code": 121,
> "type": "uint8",
> "array": true
>
> }
> ]
>
> I get the following error:
> DHCP4_PARSER_FAIL failed to create or run parser for configuration
> element option-def: unable to override definition of option '121' in
> standard option space 'dhcp4'
>
>
> I understand from the Kea ARM documentation (https://kea.readthedocs.io/
> en/latest/arm/dhcp4-srv.html#id5 <https://kea.readthedocs.io/en/latest/
> arm/dhcp4-srv.html#id5>) that Option 121 is already part of the standard
> DHCPv4 option definitions. However, in my use case, I need to send
> custom data under option 121 because the client expects it.
>
> Is there a supported way in Kea to:
>
> 1.
>
> Override standard options like 121 with custom format/data?
>
> 2.
>
> Send custom data using option 121 in a way compatible with clients
> expecting it?
>
> Any advice or suggested workarounds would be greatly appreciated.
> Note that this is not only for option 121, I am also using other option
> numbers also as custom option.
>
> Best regards,
> Dipesh
>
>
This is covered in this KB article:
https://kb.isc.org/docs/redefining-standard-options
If the values you need to send are arbitrary bytes (not just ASCII
printable characters), you'll most likely need to use a hex string
literal rather than a regular string literal. See:
https://kea.readthedocs.io/en/stable/arm/classify.html#using-expressions-in-classification
-Doug
More information about the Kea-users
mailing list