[Kea-users] reservations and classes

Francis Dupont fdupont at isc.org
Tue Jan 8 20:23:19 UTC 2019


=?utf-8?B?QsOWU0NIIENocmlzdGlhbg==?= writes:
> I want to allow only hosts with reservations and specific client class
> in some different subnets.
> With isc-dhcp I used allow members of ??
> 
> I tried the following below in kea, but that doesn't seem to work.
> Does anyone have an idea?
> 
> "Dhcp4": {
> ...
>     "client-classes": [
>         {
>             "name": "cl-test",
>             // "test": "member('KNOWN')",
>             "test": "member('cl-test')",
>             "only-if-required": true

=> the problem is here: only-if-required (and what should replace it)
makes the evaluation of the class too late. The KNOWN idea is good
but it works only for pools which BTW is enough for most uses.

>         }
>     ],

>     "reservations": [
>         {
>             "hw-address": "fc:3f:db:36:09:aa",
>             "hostname": "test",
>             "client-classes": [ "cl-test" ]

=> same issue: client-classes is applied very late.

>         }
>     ],

> ...
>     "subnet4": [
>   {
>       "id": 151,
>       "reservation-mode": "global",
>       "pools": [ { "pool":  "172.21.151.10 - 172.21.151.250" } ],
>       "subnet": "172.21.151.0/24",
>       "require-client-classes": [ "cl-test" ]

=> require-client-classes makes listed classes to be added when the
subnet was selected. Obviously it is not what you want. IMHO you need
a guard ("client-class" clause) but as the localization (aka subnet
/ shared-network selection) is done first you need to apply the guard
to the pool.

>   },

Regards

Francis Dupont <fdupont at isc.org>



More information about the Kea-users mailing list