Skip to content

Services: Kea: DHCPv4/v6: Add single client_class support to DHCP options#9988

Merged
Monviech merged 8 commits intomasterfrom
kea-client-classes
Mar 18, 2026
Merged

Services: Kea: DHCPv4/v6: Add single client_class support to DHCP options#9988
Monviech merged 8 commits intomasterfrom
kea-client-classes

Conversation

@Monviech
Copy link
Copy Markdown
Member

@Monviech Monviech commented Mar 17, 2026

Should theoretically fix issues like these generically: #9912

For: #9942

Matching a DHCP option is optional.

This should match 90% of the usecases, and makes it easy to reason with (if this -> then that, in the same dialog), no complex hierarchies possible.

Send option always:
image

Send option only to clients who send that option 93 (client arch) and it's a certain data value
image

image

Attach to any subnet4/subnet6 and reservation
image

Configuration example:

{
    "Dhcp4": {
        "subnet4": [
            {
                "id": 1,
                "subnet": "192.168.50.0\/24",
                "next-server": "",
                "match-client-id": false,
                "option-data": [
                    {
                        "name": "domain-name-servers",
                        "data": "192.168.30.1"
                    },
                    {
                        "name": "routers",
                        "data": "192.168.30.1"
                    },
                    {
                        "name": "domain-name",
                        "data": "ad.pischem.com"
                    },
                    {
                        "name": "ntp-servers",
                        "data": "192.168.30.1"
                    },
                    {
                        "code": 3,
                        "csv-format": false,
                        "data": "06060606",
                        "always-send": false
                    },
                    {
                        "code": 4,
                        "csv-format": false,
                        "data": "08080808",
                        "always-send": false,
                        "client-classes": [
                            "b5ba1864-bc3d-43e7-9e8d-b31b34ad59f6"
                        ]
                    }
                ],
                "pools": [
                    {
                        "pool": "192.168.50.100-192.168.50.110"
                    }
                ],
                "reservations": []
            }
        ],
        "client-classes": [
            {
                "name": "b5ba1864-bc3d-43e7-9e8d-b31b34ad59f6",
                "test": "option[7].hex == 0x01010101"
            }
        ]
    }
}

@Monviech Monviech changed the title Services: Kea: DHCPv4: A DHCP option can be matched with a single client_class Services: Kea: DHCPv4/v6: Add single client_class support to DHCP options Mar 18, 2026
… help text, add unique constraint to description
@Monviech Monviech merged commit 633fbc6 into master Mar 18, 2026
@Monviech Monviech deleted the kea-client-classes branch March 18, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants