<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Thanks Francis,<div class=""><br class=""></div><div class="">but now I tried with the guard “client-class” in the pool section:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    "subnet4": [</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  {</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">      "id": 151,</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">      "reservation-mode": "global",</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">      "subnet": "172.21.151.0/24",</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">      "pools": [</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">        {</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">            "pool":  "172.21.151.10 - 172.21.151.250",</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">            "client-class": "cl-test"</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">        }</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">      ]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  }</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">First I tried to add the class to the host:</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    "client-classes": [</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">        {</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">            "name": "cl-test",</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class="">            "test": "member('cl-test')"</div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">        }</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    ],</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    "reservations": [</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">        {</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">            "hw-address": "fc:3f:db:36:09:ad",</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">            "hostname": "test",</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">            "client-classes": [ "cl-test" ]</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">        }</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    ],</span></div><div style="font-family: Menlo; font-size: 11px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="font-family: Menlo; font-size: 11px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">I got: </span>ALLOC_ENGINE_V4_ALLOC_FAIL</div><div style="font-family: Menlo; font-size: 11px;" class=""><br class=""></div><div style="font-family: Menlo; font-size: 11px;" class="">Then I tried only with KNOWN:</div><div style="font-family: Menlo; font-size: 11px;" class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    "client-classes": [</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">        {</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">            "name": "cl-test",</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">            "test": "member('KNOWN')"</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class="">        }</div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    ],</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    "reservations": [</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">        {</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">            "hw-address": "fc:3f:db:36:09:ad",</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">            "hostname": "test"</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class="">        }</div><div style="font-family: Menlo; font-size: 11px; margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    ],</span></div><div style="font-family: Menlo; font-size: 11px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="font-family: Menlo; font-size: 11px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">I still got: </span>ALLOC_ENGINE_V4_ALLOC_FAIL</span></div><div style="font-family: Menlo; font-size: 11px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">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.</span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class=""><br class=""></span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">Thanks and kind regards,</span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">Christian</span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class=""><br class=""></span></font></div></div></div></span></div><div><blockquote type="cite" class=""><div class="">On 08.01.2019, at 21:23 , Francis Dupont <<a href="mailto:fdupont@isc.org" class="">fdupont@isc.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">=?utf-8?B?QsOWU0NIIENocmlzdGlhbg==?= writes:<br class=""><blockquote type="cite" class="">I want to allow only hosts with reservations and specific client class<br class="">in some different subnets.<br class="">With isc-dhcp I used allow members of ??<br class=""><br class="">I tried the following below in kea, but that doesn't seem to work.<br class="">Does anyone have an idea?<br class=""><br class="">"Dhcp4": {<br class="">...<br class="">    "client-classes": [<br class="">        {<br class="">            "name": "cl-test",<br class="">            // "test": "member('KNOWN')",<br class="">            "test": "member('cl-test')",<br class="">            "only-if-required": true<br class=""></blockquote><br class="">=> the problem is here: only-if-required (and what should replace it)<br class="">makes the evaluation of the class too late. The KNOWN idea is good<br class="">but it works only for pools which BTW is enough for most uses.<br class=""><br class=""><blockquote type="cite" class="">        }<br class="">    ],<br class=""></blockquote><br class=""><blockquote type="cite" class="">    "reservations": [<br class="">        {<br class="">            "hw-address": "fc:3f:db:36:09:aa",<br class="">            "hostname": "test",<br class="">            "client-classes": [ "cl-test" ]<br class=""></blockquote><br class="">=> same issue: client-classes is applied very late.<br class=""><br class=""><blockquote type="cite" class="">        }<br class="">    ],<br class=""></blockquote><br class=""><blockquote type="cite" class="">...<br class="">    "subnet4": [<br class="">  {<br class="">      "id": 151,<br class="">      "reservation-mode": "global",<br class="">      "pools": [ { "pool":  "172.21.151.10 - 172.21.151.250" } ],<br class="">      "subnet": "172.21.151.0/24",<br class="">      "require-client-classes": [ "cl-test" ]<br class=""></blockquote><br class="">=> require-client-classes makes listed classes to be added when the<br class="">subnet was selected. Obviously it is not what you want. IMHO you need<br class="">a guard ("client-class" clause) but as the localization (aka subnet<br class="">/ shared-network selection) is done first you need to apply the guard<br class="">to the pool.<br class=""><br class=""><blockquote type="cite" class="">  },<br class=""></blockquote><br class="">Regards<br class=""><br class="">Francis Dupont <<a href="mailto:fdupont@isc.org" class="">fdupont@isc.org</a>><br class=""></div></div></blockquote></div><br class=""></div></body></html>