Merging classes
Andrew Bell <[email protected]> Tue, 6 Sep 2022 16:38:37 -0400
| Newsgroups | gmane.network.dhcp.isc.dhcp-server |
|---|---|
| Message-ID | <CAMcY7=in74CthMFSfZPgsyTEQSbkYr=1QoxezYjk2rBDOmkfQw__19993.9257859782$1662496765$gmane$org@mail.gmail.com> |
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
--
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
dhcp-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/dhcp-users