“subclass” in ISC DHCP was a “speed hack” according to the manual pages.
Basically, you are going to want to create a class called “denyClients” adding the macs that you want to deny to the class (https://kea.readthedocs.io/en/kea-2.2.0/arm/classify.html) possibly something like the below: “client-classes”: [ { “name”: “denyClients”, “test”: “hex string(pkt4.mac, ‘:’) == '11:22:33:44:ab:66’ or hex string(pkt4.mac, ‘:’) == '11:22:33:43:ab:66’ or hex string(pkt4.mac, ‘:’) == '11:22:33:42:ab:66’ ” }, Tho the test line may not be quite right as I’ve not tested the hex string(pkt4.mac, ‘:’) to make sure that works like I think it does (https://kea.readthedocs.io/en/kea-2.2.0/arm/classify.html#hexstring). Then (there might be a better way to do this) define a class that tests membership based on the client not being a member of denyClients { “name”: “allowClients”, “test”: "(not(member(‘denyClients')))” } ] Then in the subnet add a require class in your pools statement: "pools": [ { "pool": “1.2.3.0-1.2.3.254", "client-class": "allowClients" > On Dec 14, 2022, at 9:30 AM, Kraishak Mahtha <[email protected]> wrote: > > Hi All, > > I am looking for the equivalent option of ISC dhcp subclass in kea-dhcp4 but > I couldn't find any, I have a case where I need to decline dhcp-lease grants > to given specific mac addresses so trying to match the same in kea-version > but I couldn't find any sub-class equivalent, can we add the specific data > (here mac address as the members of the specific class) in kea > > MY ISC DHCP config > class "denyClients" { > match substring (hardware, 1, 6); > deny booting; > } > subclass "denyClients" 11:22:33:44:ab:66; > subclass "denyClients" 11:22:33:43:ab:66; > subclass "denyClients" 11:22:33:42:ab:66; > subnet 12.0.0.0 netmask 255.255.255.0 { > pool { > failover peer "Test"; > range 12.0.0.2 12.0.0.2; > deny members of "denyClients"; > } > default-lease-time 3600; > option routers 12.0.0.1; > option subnet-mask 255.255.255.0; > } > > > Can anyone please advise or suggest how to add members to the DHCP class or > the data for which the class should be applied > > Thanks in Advance > Kraishak > > > > -- > ISC funds the development of this software with paid support subscriptions. > Contact us at https://www.isc.org/contact/ for more information. > > To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users. > > Kea-users mailing list > [email protected] > https://lists.isc.org/mailman/listinfo/kea-users
-- ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users. Kea-users mailing list [email protected] https://lists.isc.org/mailman/listinfo/kea-users
