can i use a wildcard " * " in a class statement ?

Glenn Satchell glenn.satchell at uniq.com.au
Wed Jun 23 00:16:17 UTC 2010


The dhcp-eval man page covers all these miscellaneous functions.

Your substring usage is fine. To put them together in one 'if' statement 
use 'or', eg:

class "ALCATEL-iptouch" {
     match if substring (option dhcp-client-identifier, 0, 15) = 
"ALCATEL-iptouch" or substring (hardware,1,3) = 00:08:9f;
}

Using the dhcp-client-identifier is probably better, as alcatel could 
use a different ethernet chip in the same series of phones (so the mac 
address might be different), or imagine that you had the same phones 
with different firmware and required a different class (client id 
different).

regards,
-glenn

On 06/23/10 03:29, donovan jeffrey j wrote:
>
> On Jun 22, 2010, at 12:39 PM, Steve van der Burg wrote:
>
>> Search for "substring" in the email archives.
>
> okay  do these sound look correct ?
>
> class "ALCATEL-iptouch" {
>          match if substring (option dhcp-client-identifier, 0, 15)="ALCATEL-iptouch"
> }
>
> or
>
> class "ALCATEL-iptouch" {
>          match if substring (hardware,1,3) = 00:08:9f;
> }
>
>
> is there an advantage to either if they both will do the same thing ? can i pipe these together ?
>
> class "ALCATEL-iptouch" {
>          match if substring (option dhcp-client-identifier, 0, 15)="ALCATEL-iptouch" ||
> 	match if substring (hardware,1,3) = 00:08:9f;
> }
>
>
> TIA
> -j
>
>
>>
>> donovan jeffrey j<donovan at beth.k12.pa.us>  wrote:
>>> Greetings
>>>
>>> working with some Alcatel ip phones.
>>>
>>> can i use a " * " in a class statement ?
>>>
>>> example:
>>>
>>> option dhcp-client-indetifier code 61 = " ALCATEL-iptouch-*";
>>



More information about the dhcp-users mailing list