Merging classes

Andrew Bell andrew at poscomp.ca
Tue Sep 6 20:38:37 UTC 2022


Hello all,

I currently have a home grown IPAM that generates a class of allowed mac
addresses for use in various privileged address pools.  Something like this:

class "coolkids" {match hardware;}
subclass "coolkids" 1:22:33:44:55:66:77;
subclass "coolkids" 1:88:99:AA:BB:CC:DD;
...

What I want to do is allow a specific group of devices in addition to
these, but using the vendor id instead of entering their mac addresses into
the IPAM.

class "coolkids" {
  match if substring (option vendor-class-identifier, 0, 7) = "abcedfg";
}

I know I can do this by using 2 separate classes and adding a second "allow
from" statement to each pool, but the pools are dynamically generated by
the IPAM and there be dragons in that code. I know, I wrote it a decade
ago...

Does anyone know of a clever way to build up a class with two different
match conditions?

Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20220906/3e08e589/attachment.htm>


More information about the dhcp-users mailing list