<div dir="ltr">Hi all,<div><br></div><div>I have a use case where one of the client class definitions should be applied for all subnets and my configuration has also been in the HA, so basically I need to assign two classes or sometimes I need to add more class statements to a subnet.</div><div>So I tried configuring it like this and it didn't give me any syntax error </div><div>Code snippet 1:</div><div>===============</div><div>"subnet4": [{<br>        "subnet": "<a href="http://4.0.0.0/24" target="_blank">4.0.0.0/24</a>",<br>        "valid-lifetime": 86400,<br>        "option-data": [<br>            {<br>                "data": "<a href="http://test.com" target="_blank">test.com</a>",<br>                "name": "domain-name"<br>            },<br>            {<br>                "data": "255.255.255.0",<br>                "name": "subnet-mask"<br>            },<br>            {<br>                "data": "4.0.0.1",<br>                "name": "routers"<br>            }<br>        ],<br>        "pools": [{<br>            "client-class": "allow-one,HA_dhcp1",<br>            "pool": "4.0.0.2-4.0.0.6"<br>        }],<br>        "id": 1<br>    }],<br>    "client-classes": [<br>        {"name": "deny-one"},<br>        {<br>            "test": "(not(member('deny-one')))",<br>            "name": "allow-one"<br>        }<br>    ]<br></div><div><br></div><div>Basically, in the deny class statement, I will be adding my black-listing clients. I am able to start the kea-dhcp service with the above config file and the service is up and running but logically it seems to be wrong and I am facing issues while the lease flow,</div><div>Later when I searched more for multiple class statements then I found like  <br><div>Code snippet 2:</div><div>===============</div></div><div>"Dhcp4": {<br>    "client-classes": [{<br>        "name": "phones",<br>        "test": "substring(option[60].hex,0,6) == 'Aastra'",<br>    }, {<br>        "name": "laptops",<br>        "test": "not member('phones')"<br>    }, {<br>        "name": "phones_server1",<br>        "test": "member('phones') and member('HA_server1')"<br>    }, {<br>        "name": "phones_server2",<br>        "test": "member('phones') and member('HA_server2')"<br>    }, {<br>        "name": "laptops_server1",<br>        "test": "member('laptops') and member('HA_server1')"<br>    }, {<br>        "name": "laptops_server2",<br>        "test": "member('laptops') and member('HA_server2')"<br>    }],<br></div><div>Where we need to create one more class definition combined with the existing class, </div><div><br></div><div>I want to know if code snippet 2 is the only way of dealing with the multiple client classes, I think code snippet 1 is also another way of dealing with the client classes because it is not giving any syntax error when I start kea-dhcp(Or I could be wrong to...)</div><div><br></div><div>The problem is I have a use case where I have 5-6 client classes for some subnets and among these I will be using 2,3,4 for one subnet and 1,4,5 for another subnet likewise If I follow the second way of dealing with the multiple client classes the configuration would be much complex.  </div><div>In ISC-DHCP we just need one statement for the client class like </div><div>allow members of client1;</div><div>deny member of client2;</div><div>....some thing like this </div><div><br></div><div>If anyone has familiarity with these concepts, much appreciate for your guidance or suggestion </div><div><br></div><div>Thanks in advance </div><div>Kraishak</div><div><br></div><div><br></div><div><br><br></div></div>