[Kea-users] Example of how to combine host reservations and class tests?

Nathan Neulinger nneul at neulinger.org
Sun Dec 4 21:35:32 UTC 2022


I see this example in the docs:

https://kea.readthedocs.io/en/kea-2.2.0/arm/dhcp4-srv.html#reserving-client-classes-in-dhcpv4

Where it's assigning 'reserved-class1' and 'reserved-class2' to to a reservation in the subnet. Is there some way to do 
this in conjunction with a 'test'?

i.e. I'd like to say:

     For a host with class "reserved-class1" _AND_ VendorClassIdentifier "X" -> these options
     For a host with class "reserved-class2" _AND_ VendorClassIdentifier "X" -> these other options

If you need a more specific example (come up on the fly, so there may certainly be better ways to do this, but I'm 
specifically wanting to do something like the above):

     JetDirect printer devices with label "office printers" -> use boot server A, filename X
     JetDirect printer devices with label "public printers" -> use boot server B, filename Y


Would it be something like (VCI likely wrong, just for example purposes:

{
     "client-classes": [
         {
             "name": "jetdirect-office",
             "test": "member('KNOWN') and member('office-printers') and substring(option[60].hex,0,9) == 'JetDirect'",
             "only-if-required": true
         }
     ]
}

combined with setting in a host reservation?

     "client-class" : "office-printers"


-- Nathan
------------------------------------------------------------
Nathan Neulingernneul at neulinger.org
Neulinger Consulting                   (573) 612-1412
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20221204/1639c321/attachment.htm>


More information about the Kea-users mailing list