Class selection ekspression

Simon Hobson dhcp at thehobsons.co.uk
Wed Mar 15 09:11:40 UTC 2006


Lars Jacobsen wrote:

>Thanks but this still does not give me answer on how to make a class 
>match where two (or more) conditions is true.
>My RID/CID is also unique but part of it is sequential and that is 
>what I want to make a (sub)class selection on.
>RID/CID = 2102011 or 2102021 or 2102031 ... 2102161 all have to end 
>up in class one.
>RID/CID = 2102171 or 2102181 or 2102191 ... 2102321 all have to end 
>up in class two.
>RID/CID = 2102331 or 2102341 or 2102351 ... 2102481 all have to end 
>up in class tree.
>I have no problem making an exact match based on the RID/CID.

You can use logical operators (ie AND, OR) in expressions, I think 
it's in 'man dhcp-eval'.

Also, have you considered subclassing ? There's a section (including 
example) in 'man dhcpd.conf' - just replace all references to MAC 
addresses with RID/CID. IIRC, it's said to be more efficient than 
large "if x or y or z or ..." constructs due to hashing.

Simon


More information about the dhcp-users mailing list