Matching multiple classes

Nicolas Ecarnot nicolas at ecarnot.net
Tue Mar 1 15:24:13 UTC 2011


Hi,

I have a setup that seems to work (done by someone else) I'd like to 
clearly understand :

class "class1" {
   match if substring (option user-class,1,7) = "\0string1";
}
class "class2" {
   match if substring (option user-class,1,7) = "\0string2";
}
class "class3" {
   match if substring (option user-class,1,7) = "\0string1"
         or substring (option user-class,1,7) = "\0string2"

Question : when parsing and testing, will the client matching the first 
class match will stop the parser, and fall into the class1, and PERIOD. ?

Or...

After having matched the first class condition, will then match the 
class3, and belong to class3 ONLY?

Or...

- Does this makes sense for a client to belong to multiple classes?
- Then in the following, this client will be used in the correct pool, 
maybe in the first one using "class1"

To be short, my question deals with the priority of class definitions 
and matching...

Thank you for your hints.

-- 
Nicolas Ecarnot



More information about the dhcp-users mailing list