DHCP option host-name matching

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

DHCP option host-name matching

Bradford Dickerson
Hi,
  At our company, we are trying to hand out IP ranges based on the characteristics of the client. For example using a class declaration as follows:

class "IPHONE_ACCORDING_TO_HOSTNAME" {
  match if substring(option host-name,0,6) = "iPhone";
}

but I notice many iphones have names like ‘Brad-iPhone’ or ’TomIphone’ does not quite match above . Is there any plan to support regex type matches?

Thx,
Brad
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP option host-name matching

José Queiroz
Hi Bradford,

It will be much easier if you use MAC Addresses to do that. That way you may use the MAC's OUI to determine the device's branding.

2016-03-11 17:35 GMT-03:00 Bradford Dickerson <[hidden email]>:
Hi,
  At our company, we are trying to hand out IP ranges based on the characteristics of the client. For example using a class declaration as follows:

class "IPHONE_ACCORDING_TO_HOSTNAME" {
  match if substring(option host-name,0,6) = "iPhone";
}

but I notice many iphones have names like ‘Brad-iPhone’ or ’TomIphone’ does not quite match above . Is there any plan to support regex type matches?

Thx,
Brad
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP option host-name matching

Bradford Dickerson
Hi Jose,
    Thanks for replying. Was looking into that but was unsuccessful ( searching on the web ) finding a list(range) of OUIs that Apple used specifically for their iphones. Thx, Brad

On Mar 11, 2016, at 3:43 PM, José Queiroz <[hidden email]> wrote:

Hi Bradford,

It will be much easier if you use MAC Addresses to do that. That way you may use the MAC's OUI to determine the device's branding.

2016-03-11 17:35 GMT-03:00 Bradford Dickerson <[hidden email]>:
Hi,
  At our company, we are trying to hand out IP ranges based on the characteristics of the client. For example using a class declaration as follows:

class "IPHONE_ACCORDING_TO_HOSTNAME" {
  match if substring(option host-name,0,6) = "iPhone";
}

but I notice many iphones have names like ‘Brad-iPhone’ or ’TomIphone’ does not quite match above . Is there any plan to support regex type matches?

Thx,
Brad
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users



_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP option host-name matching

José Queiroz
PS: Sorry the [possible] double posting, for some reason my messages aren't being received by the list.

2016-03-11 18:09 GMT-03:00 Bradford Dickerson <[hidden email]>:
Hi Jose,
    Thanks for replying. Was looking into that but was unsuccessful ( searching on the web ) finding a list(range) of OUIs that Apple used specifically for their iphones. Thx, Brad

On Mar 11, 2016, at 3:43 PM, José Queiroz <[hidden email]> wrote:

Hi Bradford,

It will be much easier if you use MAC Addresses to do that. That way you may use the MAC's OUI to determine the device's branding.

2016-03-11 17:35 GMT-03:00 Bradford Dickerson <[hidden email]>:
Hi,
  At our company, we are trying to hand out IP ranges based on the characteristics of the client. For example using a class declaration as follows:

class "IPHONE_ACCORDING_TO_HOSTNAME" {
  match if substring(option host-name,0,6) = "iPhone";
}

but I notice many iphones have names like ‘Brad-iPhone’ or ’TomIphone’ does not quite match above . Is there any plan to support regex type matches?

Thx,
Brad
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users




_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP option host-name matching

Bradford Dickerson
Thanks Jose for pointer to list. I could use that to identify Apple clients. To narrow it down to various apple types such as iphones, ipads vs mac computers dont think it will help.

On Mar 11, 2016, at 4:44 PM, José Queiroz <[hidden email]> wrote:

PS: Sorry the [possible] double posting, for some reason my messages aren't being received by the list.

2016-03-11 18:09 GMT-03:00 Bradford Dickerson <[hidden email]>:
Hi Jose,
    Thanks for replying. Was looking into that but was unsuccessful ( searching on the web ) finding a list(range) of OUIs that Apple used specifically for their iphones. Thx, Brad

On Mar 11, 2016, at 3:43 PM, José Queiroz <[hidden email]> wrote:

Hi Bradford,

It will be much easier if you use MAC Addresses to do that. That way you may use the MAC's OUI to determine the device's branding.

2016-03-11 17:35 GMT-03:00 Bradford Dickerson <[hidden email]>:
Hi,
  At our company, we are trying to hand out IP ranges based on the characteristics of the client. For example using a class declaration as follows:

class "IPHONE_ACCORDING_TO_HOSTNAME" {
  match if substring(option host-name,0,6) = "iPhone";
}

but I notice many iphones have names like ‘Brad-iPhone’ or ’TomIphone’ does not quite match above . Is there any plan to support regex type matches?

Thx,
Brad
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users





_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP option host-name matching

glenn.satchell
Regex matching has been a part of the syntax for many years. See dhcp-eval
man page on your system.

     data-expression-1 ~= data-expression-2 data-expression-1  ~~
     data-expression-2

       The ~= and ~~ operators (not  available  on  all  systems)
       perform  extended  regex(7)  matching of the values of two
       data  expressions,  returning  true  if  data-expression-1
       matches  against the regular expression evaluated by data-
       expression-2, or false if it does not match or  encounters
       some  error.   If  either the left-hand side or the right-
       hand side are null or empty strings, the  result  is  also
       false.   The  ~~  operator differs from the ~= operator in
       that it is case-insensitive.

So you'll want something like this, but it's not foolproof either as the
user could name the system anything they like.

class "IPHONE_ACCORDING_TO_HOSTNAME" {
   match if option host-name ~= "iPhone";
}

regards,
-glenn

On Sat, March 12, 2016 9:06 am, Bradford Dickerson wrote:

> Thanks Jose for pointer to list. I could use that to identify Apple
> clients. To narrow it down to various apple types such as iphones, ipads
> vs mac computers dont think it will help.
>
>> On Mar 11, 2016, at 4:44 PM, José Queiroz <[hidden email]> wrote:
>>
>> Have you seen this?
>> https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf
>> <https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf>
>>
>> PS: Sorry the [possible] double posting, for some reason my messages
>> aren't being received by the list.
>>
>> 2016-03-11 18:09 GMT-03:00 Bradford Dickerson <[hidden email]
>> <mailto:[hidden email]>>:
>> Hi Jose,
>>     Thanks for replying. Was looking into that but was unsuccessful (
>> searching on the web ) finding a list(range) of OUIs that Apple used
>> specifically for their iphones. Thx, Brad
>>
>>> On Mar 11, 2016, at 3:43 PM, José Queiroz <[hidden email]
>>> <mailto:[hidden email]>> wrote:
>>>
>>> Hi Bradford,
>>>
>>> It will be much easier if you use MAC Addresses to do that. That way
>>> you may use the MAC's OUI to determine the device's branding.
>>>
>>> 2016-03-11 17:35 GMT-03:00 Bradford Dickerson <[hidden email]
>>> <mailto:[hidden email]>>:
>>> Hi,
>>>   At our company, we are trying to hand out IP ranges based on the
>>> characteristics of the client. For example using a class declaration
>>> as follows:
>>>
>>> class "IPHONE_ACCORDING_TO_HOSTNAME" {
>>>   match if substring(option host-name,0,6) = "iPhone";
>>> }
>>>
>>> but I notice many iphones have names like ‘Brad-iPhone’ or
>>> ’TomIphone’ does not quite match above . Is there any plan to
>>> support regex type matches?
>>>
>>> Thx,
>>> Brad
>>> _______________________________________________
>>> dhcp-users mailing list
>>> [hidden email] <mailto:[hidden email]>
>>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>> <https://lists.isc.org/mailman/listinfo/dhcp-users>
>>
>>
>
> _______________________________________________
> dhcp-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP option host-name matching

Bradford Dickerson
Thanks Glenn! I didnt see that option when looking at man pages first time through but now I do!. Thx, Brad

> On Mar 13, 2016, at 10:24 PM, Glenn Satchell <[hidden email]> wrote:
>
> Regex matching has been a part of the syntax for many years. See dhcp-eval
> man page on your system.
>
>     data-expression-1 ~= data-expression-2 data-expression-1  ~~
>     data-expression-2
>
>       The ~= and ~~ operators (not  available  on  all  systems)
>       perform  extended  regex(7)  matching of the values of two
>       data  expressions,  returning  true  if  data-expression-1
>       matches  against the regular expression evaluated by data-
>       expression-2, or false if it does not match or  encounters
>       some  error.   If  either the left-hand side or the right-
>       hand side are null or empty strings, the  result  is  also
>       false.   The  ~~  operator differs from the ~= operator in
>       that it is case-insensitive.
>
> So you'll want something like this, but it's not foolproof either as the
> user could name the system anything they like.
>
> class "IPHONE_ACCORDING_TO_HOSTNAME" {
>   match if option host-name ~= "iPhone";
> }
>
> regards,
> -glenn
>
> On Sat, March 12, 2016 9:06 am, Bradford Dickerson wrote:
>> Thanks Jose for pointer to list. I could use that to identify Apple
>> clients. To narrow it down to various apple types such as iphones, ipads
>> vs mac computers dont think it will help.
>>
>>> On Mar 11, 2016, at 4:44 PM, José Queiroz <[hidden email]> wrote:
>>>
>>> Have you seen this?
>>> https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf
>>> <https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf>
>>>
>>> PS: Sorry the [possible] double posting, for some reason my messages
>>> aren't being received by the list.
>>>
>>> 2016-03-11 18:09 GMT-03:00 Bradford Dickerson <[hidden email]
>>> <mailto:[hidden email]>>:
>>> Hi Jose,
>>>    Thanks for replying. Was looking into that but was unsuccessful (
>>> searching on the web ) finding a list(range) of OUIs that Apple used
>>> specifically for their iphones. Thx, Brad
>>>
>>>> On Mar 11, 2016, at 3:43 PM, José Queiroz <[hidden email]
>>>> <mailto:[hidden email]>> wrote:
>>>>
>>>> Hi Bradford,
>>>>
>>>> It will be much easier if you use MAC Addresses to do that. That way
>>>> you may use the MAC's OUI to determine the device's branding.
>>>>
>>>> 2016-03-11 17:35 GMT-03:00 Bradford Dickerson <[hidden email]
>>>> <mailto:[hidden email]>>:
>>>> Hi,
>>>>  At our company, we are trying to hand out IP ranges based on the
>>>> characteristics of the client. For example using a class declaration
>>>> as follows:
>>>>
>>>> class "IPHONE_ACCORDING_TO_HOSTNAME" {
>>>>  match if substring(option host-name,0,6) = "iPhone";
>>>> }
>>>>
>>>> but I notice many iphones have names like ‘Brad-iPhone’ or
>>>> ’TomIphone’ does not quite match above . Is there any plan to
>>>> support regex type matches?
>>>>
>>>> Thx,
>>>> Brad
>>>> _______________________________________________
>>>> dhcp-users mailing list
>>>> [hidden email] <mailto:[hidden email]>
>>>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>>> <https://lists.isc.org/mailman/listinfo/dhcp-users>
>>>
>>>
>>
>> _______________________________________________
>> dhcp-users mailing list
>> [hidden email]
>> https://lists.isc.org/mailman/listinfo/dhcp-users
>
>
> _______________________________________________
> dhcp-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/dhcp-users

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP option host-name matching

Bill Shirley
In reply to this post by glenn.satchell
Thanks for pointing the regex out.  I've been using:
lcase(suffix(option host-name, 6)) = "iphone"
but just realized it's missing 'Steffansiphone5'

I'm going to give the regex a try.

To prevent DNS name collisions, you might want to add to the class:
if (lcase(option host-name) = "iphone") { ddns-hostname = concat("iPhone-", binary-to-ascii(16, 8, "", substring(hardware, 4, 3))); }
Since some users don't change their hostname.

Bill

On 3/13/2016 10:24 PM, Glenn Satchell wrote:
Regex matching has been a part of the syntax for many years. See dhcp-eval
man page on your system.

     data-expression-1 ~= data-expression-2 data-expression-1  ~~
     data-expression-2

       The ~= and ~~ operators (not  available  on  all  systems)
       perform  extended  regex(7)  matching of the values of two
       data  expressions,  returning  true  if  data-expression-1
       matches  against the regular expression evaluated by data-
       expression-2, or false if it does not match or  encounters
       some  error.   If  either the left-hand side or the right-
       hand side are null or empty strings, the  result  is  also
       false.   The  ~~  operator differs from the ~= operator in
       that it is case-insensitive.

So you'll want something like this, but it's not foolproof either as the
user could name the system anything they like.

class "IPHONE_ACCORDING_TO_HOSTNAME" {
   match if option host-name ~= "iPhone";
}

regards,
-glenn

On Sat, March 12, 2016 9:06 am, Bradford Dickerson wrote:
Thanks Jose for pointer to list. I could use that to identify Apple
clients. To narrow it down to various apple types such as iphones, ipads
vs mac computers dont think it will help.

On Mar 11, 2016, at 4:44 PM, José Queiroz [hidden email] wrote:

Have you seen this?
https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf
<https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf>

PS: Sorry the [possible] double posting, for some reason my messages
aren't being received by the list.

2016-03-11 18:09 GMT-03:00 Bradford Dickerson <[hidden email]
[hidden email]>:
Hi Jose,
    Thanks for replying. Was looking into that but was unsuccessful (
searching on the web ) finding a list(range) of OUIs that Apple used
specifically for their iphones. Thx, Brad

On Mar 11, 2016, at 3:43 PM, José Queiroz <[hidden email]
[hidden email]> wrote:

Hi Bradford,

It will be much easier if you use MAC Addresses to do that. That way
you may use the MAC's OUI to determine the device's branding.

2016-03-11 17:35 GMT-03:00 Bradford Dickerson <[hidden email]
[hidden email]>:
Hi,
  At our company, we are trying to hand out IP ranges based on the
characteristics of the client. For example using a class declaration
as follows:

class "IPHONE_ACCORDING_TO_HOSTNAME" {
  match if substring(option host-name,0,6) = "iPhone";
}

but I notice many iphones have names like ‘Brad-iPhone’ or
’TomIphone’ does not quite match above . Is there any plan to
support regex type matches?

Thx,
Brad
_______________________________________________
dhcp-users mailing list
[hidden email] [hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
<https://lists.isc.org/mailman/listinfo/dhcp-users>

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP option host-name matching

José Queiroz
In reply to this post by Bradford Dickerson
What if Stephan changes its iphone's name to "MadMakingMachine"?



2016-03-14 10:43 GMT-03:00 Bradford Dickerson <[hidden email]>:
Thanks Glenn! I didnt see that option when looking at man pages first time through but now I do!. Thx, Brad
> On Mar 13, 2016, at 10:24 PM, Glenn Satchell <[hidden email]> wrote:
>
> Regex matching has been a part of the syntax for many years. See dhcp-eval
> man page on your system.
>
>     data-expression-1 ~= data-expression-2 data-expression-1  ~~
>     data-expression-2
>
>       The ~= and ~~ operators (not  available  on  all  systems)
>       perform  extended  regex(7)  matching of the values of two
>       data  expressions,  returning  true  if  data-expression-1
>       matches  against the regular expression evaluated by data-
>       expression-2, or false if it does not match or  encounters
>       some  error.   If  either the left-hand side or the right-
>       hand side are null or empty strings, the  result  is  also
>       false.   The  ~~  operator differs from the ~= operator in
>       that it is case-insensitive.
>
> So you'll want something like this, but it's not foolproof either as the
> user could name the system anything they like.
>
> class "IPHONE_ACCORDING_TO_HOSTNAME" {
>   match if option host-name ~= "iPhone";
> }
>
> regards,
> -glenn
>
> On Sat, March 12, 2016 9:06 am, Bradford Dickerson wrote:
>> Thanks Jose for pointer to list. I could use that to identify Apple
>> clients. To narrow it down to various apple types such as iphones, ipads
>> vs mac computers dont think it will help.
>>
>>> On Mar 11, 2016, at 4:44 PM, José Queiroz <[hidden email]> wrote:
>>>
>>> Have you seen this?
>>> https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf
>>> <https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf>
>>>
>>> PS: Sorry the [possible] double posting, for some reason my messages
>>> aren't being received by the list.
>>>
>>> 2016-03-11 18:09 GMT-03:00 Bradford Dickerson <[hidden email]
>>> <mailto:[hidden email]>>:
>>> Hi Jose,
>>>    Thanks for replying. Was looking into that but was unsuccessful (
>>> searching on the web ) finding a list(range) of OUIs that Apple used
>>> specifically for their iphones. Thx, Brad
>>>
>>>> On Mar 11, 2016, at 3:43 PM, José Queiroz <[hidden email]
>>>> <mailto:[hidden email]>> wrote:
>>>>
>>>> Hi Bradford,
>>>>
>>>> It will be much easier if you use MAC Addresses to do that. That way
>>>> you may use the MAC's OUI to determine the device's branding.
>>>>
>>>> 2016-03-11 17:35 GMT-03:00 Bradford Dickerson <[hidden email]
>>>> <mailto:[hidden email]>>:
>>>> Hi,
>>>>  At our company, we are trying to hand out IP ranges based on the
>>>> characteristics of the client. For example using a class declaration
>>>> as follows:
>>>>
>>>> class "IPHONE_ACCORDING_TO_HOSTNAME" {
>>>>  match if substring(option host-name,0,6) = "iPhone";
>>>> }
>>>>
>>>> but I notice many iphones have names like ‘Brad-iPhone’ or
>>>> ’TomIphone’ does not quite match above . Is there any plan to
>>>> support regex type matches?
>>>>
>>>> Thx,
>>>> Brad
>>>> _______________________________________________
>>>> dhcp-users mailing list
>>>> [hidden email] <mailto:[hidden email]>
>>>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>>> <https://lists.isc.org/mailman/listinfo/dhcp-users>
>>>
>>>
>>
>> _______________________________________________
>> dhcp-users mailing list
>> [hidden email]
>> https://lists.isc.org/mailman/listinfo/dhcp-users
>
>
> _______________________________________________
> dhcp-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/dhcp-users

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP option host-name matching

Bradford Dickerson
Yes would miss that one. In our particular case though it is ok since we are just trying to roughly characterize the traffic and don't think most of our users change there iPhone name but could be wrong. 

Sent from my iPhone

On Mar 15, 2016, at 5:07 PM, José Queiroz <[hidden email]> wrote:

What if Stephan changes its iphone's name to "MadMakingMachine"?



2016-03-14 10:43 GMT-03:00 Bradford Dickerson <[hidden email]>:
Thanks Glenn! I didnt see that option when looking at man pages first time through but now I do!. Thx, Brad
> On Mar 13, 2016, at 10:24 PM, Glenn Satchell <[hidden email]> wrote:
>
> Regex matching has been a part of the syntax for many years. See dhcp-eval
> man page on your system.
>
>     data-expression-1 ~= data-expression-2 data-expression-1  ~~
>     data-expression-2
>
>       The ~= and ~~ operators (not  available  on  all  systems)
>       perform  extended  regex(7)  matching of the values of two
>       data  expressions,  returning  true  if  data-expression-1
>       matches  against the regular expression evaluated by data-
>       expression-2, or false if it does not match or  encounters
>       some  error.   If  either the left-hand side or the right-
>       hand side are null or empty strings, the  result  is  also
>       false.   The  ~~  operator differs from the ~= operator in
>       that it is case-insensitive.
>
> So you'll want something like this, but it's not foolproof either as the
> user could name the system anything they like.
>
> class "IPHONE_ACCORDING_TO_HOSTNAME" {
>   match if option host-name ~= "iPhone";
> }
>
> regards,
> -glenn
>
> On Sat, March 12, 2016 9:06 am, Bradford Dickerson wrote:
>> Thanks Jose for pointer to list. I could use that to identify Apple
>> clients. To narrow it down to various apple types such as iphones, ipads
>> vs mac computers dont think it will help.
>>
>>> On Mar 11, 2016, at 4:44 PM, José Queiroz <[hidden email]> wrote:
>>>
>>> Have you seen this?
>>> https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf
>>> <https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf>
>>>
>>> PS: Sorry the [possible] double posting, for some reason my messages
>>> aren't being received by the list.
>>>
>>> 2016-03-11 18:09 GMT-03:00 Bradford Dickerson <[hidden email]
>>> <mailto:[hidden email]>>:
>>> Hi Jose,
>>>    Thanks for replying. Was looking into that but was unsuccessful (
>>> searching on the web ) finding a list(range) of OUIs that Apple used
>>> specifically for their iphones. Thx, Brad
>>>
>>>> On Mar 11, 2016, at 3:43 PM, José Queiroz <[hidden email]
>>>> <mailto:[hidden email]>> wrote:
>>>>
>>>> Hi Bradford,
>>>>
>>>> It will be much easier if you use MAC Addresses to do that. That way
>>>> you may use the MAC's OUI to determine the device's branding.
>>>>
>>>> 2016-03-11 17:35 GMT-03:00 Bradford Dickerson <[hidden email]
>>>> <mailto:[hidden email]>>:
>>>> Hi,
>>>>  At our company, we are trying to hand out IP ranges based on the
>>>> characteristics of the client. For example using a class declaration
>>>> as follows:
>>>>
>>>> class "IPHONE_ACCORDING_TO_HOSTNAME" {
>>>>  match if substring(option host-name,0,6) = "iPhone";
>>>> }
>>>>
>>>> but I notice many iphones have names like ‘Brad-iPhone’ or
>>>> ’TomIphone’ does not quite match above . Is there any plan to
>>>> support regex type matches?
>>>>
>>>> Thx,
>>>> Brad
>>>> _______________________________________________
>>>> dhcp-users mailing list
>>>> [hidden email] <mailto:[hidden email]>
>>>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>>> <https://lists.isc.org/mailman/listinfo/dhcp-users>
>>>
>>>
>>
>> _______________________________________________
>> dhcp-users mailing list
>> [hidden email]
>> https://lists.isc.org/mailman/listinfo/dhcp-users
>
>
> _______________________________________________
> dhcp-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/dhcp-users

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: [Ext] Re: DHCP option host-name matching

Jim Glassford

Don't overlook you will see names you would not use in front of your mother, children or ever dreamed someone would use.



On 3/15/2016 9:00 PM, Bradford Dickerson wrote:
Yes would miss that one. In our particular case though it is ok since we are just trying to roughly characterize the traffic and don't think most of our users change there iPhone name but could be wrong. 

Sent from my iPhone

On Mar 15, 2016, at 5:07 PM, José Queiroz <[hidden email]> wrote:

What if Stephan changes its iphone's name to "MadMakingMachine"?



2016-03-14 10:43 GMT-03:00 Bradford Dickerson <[hidden email]>:
Thanks Glenn! I didnt see that option when looking at man pages first time through but now I do!. Thx, Brad
> On Mar 13, 2016, at 10:24 PM, Glenn Satchell <[hidden email]> wrote:
>
> Regex matching has been a part of the syntax for many years. See dhcp-eval
> man page on your system.
>
>     data-expression-1 ~= data-expression-2 data-expression-1  ~~
>     data-expression-2
>
>       The ~= and ~~ operators (not  available  on  all  systems)
>       perform  extended  regex(7)  matching of the values of two
>       data  expressions,  returning  true  if  data-expression-1
>       matches  against the regular expression evaluated by data-
>       expression-2, or false if it does not match or  encounters
>       some  error.   If  either the left-hand side or the right-
>       hand side are null or empty strings, the  result  is  also
>       false.   The  ~~  operator differs from the ~= operator in
>       that it is case-insensitive.
>
> So you'll want something like this, but it's not foolproof either as the
> user could name the system anything they like.
>
> class "IPHONE_ACCORDING_TO_HOSTNAME" {
>   match if option host-name ~= "iPhone";
> }
>
> regards,
> -glenn
>
> On Sat, March 12, 2016 9:06 am, Bradford Dickerson wrote:
>> Thanks Jose for pointer to list. I could use that to identify Apple
>> clients. To narrow it down to various apple types such as iphones, ipads
>> vs mac computers dont think it will help.
>>
>>> On Mar 11, 2016, at 4:44 PM, José Queiroz <[hidden email]> wrote:
>>>
>>> Have you seen this?
>>> https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf
>>> <https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf>
>>>
>>> PS: Sorry the [possible] double posting, for some reason my messages
>>> aren't being received by the list.
>>>
>>> 2016-03-11 18:09 GMT-03:00 Bradford Dickerson <[hidden email]
>>> <mailto:[hidden email]>>:
>>> Hi Jose,
>>>    Thanks for replying. Was looking into that but was unsuccessful (
>>> searching on the web ) finding a list(range) of OUIs that Apple used
>>> specifically for their iphones. Thx, Brad
>>>
>>>> On Mar 11, 2016, at 3:43 PM, José Queiroz <[hidden email]
>>>> <mailto:[hidden email]>> wrote:
>>>>
>>>> Hi Bradford,
>>>>
>>>> It will be much easier if you use MAC Addresses to do that. That way
>>>> you may use the MAC's OUI to determine the device's branding.
>>>>
>>>> 2016-03-11 17:35 GMT-03:00 Bradford Dickerson <[hidden email]
>>>> <mailto:[hidden email]>>:
>>>> Hi,
>>>>  At our company, we are trying to hand out IP ranges based on the
>>>> characteristics of the client. For example using a class declaration
>>>> as follows:
>>>>
>>>> class "IPHONE_ACCORDING_TO_HOSTNAME" {
>>>>  match if substring(option host-name,0,6) = "iPhone";
>>>> }
>>>>
>>>> but I notice many iphones have names like ‘Brad-iPhone’ or
>>>> ’TomIphone’ does not quite match above . Is there any plan to
>>>> support regex type matches?
>>>>
>>>> Thx,
>>>> Brad
>>>> _______________________________________________
>>>> dhcp-users mailing list
>>>> [hidden email] <mailto:[hidden email]>
>>>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>>> <https://lists.isc.org/mailman/listinfo/dhcp-users>
>>>
>>>
>>
>> _______________________________________________
>> dhcp-users mailing list
>> [hidden email]
>> https://lists.isc.org/mailman/listinfo/dhcp-users
>
>
> _______________________________________________
> dhcp-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/dhcp-users

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users