[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dhcp-users
Subject:    Re: can i use a wildcard " * " in a class statement ?
From:       Glenn Satchell <glenn.satchell () uniq ! com ! au>
Date:       2010-06-23 0:16:17
Message-ID: 4C215251.2040002 () uniq ! com ! au
[Download RAW message or body]

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@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-*";
>>
_______________________________________________
dhcp-users mailing list
dhcp-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic