[Kea-users] reservations and classes
BÖSCH Christian
boesch at fhv.at
Wed Jan 9 10:02:59 UTC 2019
Thanks Francis,
but now I tried with the guard “client-class” in the pool section:
"subnet4": [
{
"id": 151,
"reservation-mode": "global",
"subnet": "172.21.151.0/24",
"pools": [
{
"pool": "172.21.151.10 - 172.21.151.250",
"client-class": "cl-test"
}
]
}
First I tried to add the class to the host:
"client-classes": [
{
"name": "cl-test",
"test": "member('cl-test')"
}
],
"reservations": [
{
"hw-address": "fc:3f:db:36:09:ad",
"hostname": "test",
"client-classes": [ "cl-test" ]
}
],
I got: ALLOC_ENGINE_V4_ALLOC_FAIL
Then I tried only with KNOWN:
"client-classes": [
{
"name": "cl-test",
"test": "member('KNOWN')"
}
],
"reservations": [
{
"hw-address": "fc:3f:db:36:09:ad",
"hostname": "test"
}
],
I still got: ALLOC_ENGINE_V4_ALLOC_FAIL
But “KNOWN" wouldn't be what I want anyway. I want to allow hosts with classA only in subnetA, and hosts with classB only in subnetB.
Thanks and kind regards,
Christian
> On 08.01.2019, at 21:23 , Francis Dupont <fdupont at isc.org> wrote:
>
> =?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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20190109/b8c07841/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3492 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20190109/b8c07841/attachment.bin>
More information about the Kea-users
mailing list