Hi,

I'm trying to overwrite option-data fields, e.g. domain-name-servers but also 
others, for specific reservations identified by MAC address. As the hosts are 
not separable by different pools, I thought the best option would be to create 
client-classes with the option-data I want to override and assign them through 
reservations to the clients so I don't have to duplicate this information 
through option-data blocks for every client. For clients without a reservation 
the idea was to set default option-data values on the subnet level.

I have the following configuration:

~~~
{
"Dhcp4": {
    ...
    "client-classes": [
      {
        "name": "google-ns",
        "option-data": [
          { "name": "domain-name-servers", "data": "8.8.8.8" }
        ]
      }
    ],
    "subnet4": [
        {
            "id": 1,
            "subnet": "192.168.24.0/24",
            "pools": [ { "pool":  "192.168.24.6 - 192.168.24.100" } ],
            "option-data": [
                { "name": "routers", "data": "192.168.24.243" },
                { "name": "domain-name-servers", "data": "192.168.24.2" },
              ],
            <?include "/etc/kea/reservations.json"?>
        }
    ],
    ...
}
~~~

Which includes the following reservations:

~~~
"reservations": [
    {
        "hw-address": "aa:bb:cc:dd:ee:ff",
        "ip-address": "192.168.24.31",
        "hostname": "dhtc01",
        "client-classes": ["google-ns"]
    },
]
~~~

In this example, clients however always get the subnets domain-name-servers 
option instead of the one configured in the assigned client-class. When I 
explicitly add the option-data to the reservation, the overwrite works.

I'm using isc-kea-dhcp4-server 2.6.1-isc20240725093407 on Debian 12.

Any pointers are greatly appreciated.

Thank you!

-- 
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