We are looking for a way to do something along these lines in the dhcpd.conf file:
subnet ... {
#couple of options for the subnet here
pool {
allow members of "class-name1";
allow members of "class-name2";
range ip1 ip2;
}
if is member of class "class-name1" {
option ...;
}
}
The part in question is if is member of class "class-name"
- no idea how to verify this condition.
Here is how the class itself is defined:
class "class name" {
match if some_condition_here;
}
Of course an obvious solution would be just repeating the same condition in the subnet
section, but would be a repetition - not a very good way to go. I also believe this goes somewhat against the essence of a class.
Another idea we had was to use separate pool
for this without specifying the range. Like this:
pool {
allow members of "class-name1";
option ...;
}
That did not work though - config is not accepted as invalid. Apparently pool
section requires a range
inside, although I am not able to find this requirement in the spec.
We had one more guess - specify two identical pools, one for other classes and one for "class-name1". However that means that the same range appears twice, which is again an invalid config.
So, is there a good way to verify if a device was classified as a member of particular class?