multiple "match-values" in a subclass

Glenn Satchell glenn.satchell at uniq.com.au
Wed Aug 8 10:54:11 UTC 2012


I guess you wanted to match ever-decreasing sub-strings, so something 
like this might work. The match operator is an "=" so strings can only 
match if they are the same length.

The syntax for boolean operators is in the dhcp-eval man page.

class "cdac.in" {
   match hardware or substring(hardware, 6, 0) or substring(hardware, 5, 
0) or substring(hardware, 4, 0) or substring(hardware, 3, 0)
};

subclass "cdac.in" 1:00:1e:ec:63:44:11;
subclass "cdac.in" 1:00:1e:ec:63:44;
subclass "cdac.in" 1:00:1e:ec:63;
subclass "cdac.in" 1:00:1e:ec;
subclass "cdac.in" 1:00:1e;

regards,
-glenn

On 08/08/12 20:04, Vijayakumar T. T. wrote:
>
>
> Hi,
>
> Please let me know how I can add multiple "match-values" in a subclass
> decleration. My aim is to specify as much as MAC address in subclass
> defenition, how it can be acheived ?? My current class and sub-class
> defenition are as below but here i was only able to define ONE MAC
> address per subclass. And in this case if i need to specify 1000 MACs
> then I should have 1000 subclass statement...How it can be avoided..??
>
> class "cdac.in" { match hardware; };
> subclass "cdac.in" 1:00:1e:ec:63:44:11;
>
> The ultimate aim to provide IP address randomly for all registered MAC.
> Since we have "N" types of NIC cards, I suppose it may not be possible
> to do any kind of maching statement in class defenition.
>
> Kinldy help !!!
>
> Regards
> VIJAY
>
>


More information about the dhcp-users mailing list