ISC DHCP "class-like" if statements
This ticket is about how to convert this ISC DHCP config style:
subnet 10.208.0.0 netmask 255.255.128.0 {
option subnet-mask 255.255.128.0 ;
if substring (option vendor-class-identifier,0,4) = "MSFT"{
option routers 10.208.0.1 ;
option domain-name-servers 10.237.3.4, 10.237.3.5 ;
}
if substring (option vendor-class-identifier,0,2) = "RG"{
option classless-routes = 0F:0A:EC:0A:D0:00:01 ;
}
pool {
deny members of "MotoVIP";
range 10.208.64.1 10.208.127.254;
}
}
(old discussion)
The 2 if (and the "MotoVIIP" class uses an test expression which can be easily converted into a match if defining a class. The domain-name-servers option shares the same value but not the routers or the classless-routes so it is not possible to set all these parameters in class definitions. As there is no subnet related class selector (for two reasons: classes are globally defined and classes are used to select subnets so can't depend on them) the idea should to split the subnet into class-dependent subnets. It works well for the subnet selection and parameter setting but not for the pool: range conflicts are detected when they occur inside a subnet, not yet (cf Trac 2346) between subnets but clearly do not work.
So IMHO it is a good place for shared networks (cf Kea 5273)... (implemented since this comment)