根据子网段内的成员资格分配选项

我们正在寻找一种方法来在dhcpd.conf文件的这些行上做一些事情:

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 ...; } } 

有问题的部分是if is member of class "class-name" – 不知道如何validation这种情况。

下面是这个类是如何定义的:

 class "class name" { match if some_condition_here; } 

当然,一个明显的解决scheme就是在subnet部分重复相同的条件,但是会是重复 – 不是一个很好的方法。 我也相信这有点违背一个阶级的本质。

我们的另一个想法是使用单独的pool而不指定范围。 喜欢这个:

 pool { allow members of "class-name1"; option ...; } 

这不起作用虽然 – configuration不被接受为无效。 显然pool部分需要一个range内,虽然我无法在规范中find这个要求。

我们还有一个猜测 – 指定两个相同的池,一个用于其他类,一个用于“class-name1”。 但是,这意味着相同的范围出现两次,这又是一个无效的configuration。

那么,是否有一种很好的方法来validation设备是否被归类为特定类别的成员?