Send dhcp-users mailing list submissions to
        [email protected]
To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/dhcp-users
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of dhcp-users digest..."


Today's Topics:

   1. Re: DHCP option host-name matching (Glenn Satchell)
   2. Re: DHCPD is not re-using addresses (Bob Proulx)


----------------------------------------------------------------------

Message: 1
Date: Mon, 14 Mar 2016 13:24:35 +1100
From: "Glenn Satchell" <[email protected]>
To: "Users of ISC DHCP" <[email protected]>
Subject: Re: DHCP option host-name matching
Message-ID:
        <[email protected]>
Content-Type: text/plain;charset=iso-8859-1

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 <[email protected]> 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 <[email protected]
>> <mailto:[email protected]>>:
>> 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 <[email protected]
>>> <mailto:[email protected]>> 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 <[email protected]
>>> <mailto:[email protected]>>:
>>> 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
>>> [email protected] <mailto:[email protected]>
>>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>> <https://lists.isc.org/mailman/listinfo/dhcp-users>
>>
>>
>
> _______________________________________________
> dhcp-users mailing list
> [email protected]
> https://lists.isc.org/mailman/listinfo/dhcp-users




------------------------------

Message: 2
Date: Mon, 14 Mar 2016 01:02:47 -0600
From: Bob Proulx <[email protected]>
To: [email protected]
Subject: Re: DHCPD is not re-using addresses
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

CLOSE Dave wrote:
> When I run PXE on a new machine, I see the Anaconda (the Fedora
> installer) makes at least three requests for a dynamic address. So far
> as I can tell, all of the requests are identical.
>...
> Even though all the requests originate from the same MAC address, the
> DHCP server gives each request a unique response. As the address leases
> take time to expire, I quickly run out of available addresses. Much more
> quickly than I should.

As Steinar Haug mentioned it is likely that the different clients are
submitting different client ids.  In which case DHCP requires
responding with a different address.

Have you considered using shorter lease times for your volatile
clients?  That way they will expire in a shorter time period and be
available to be reused.  There are likely much better ways to
accomplish this but this is what I do.  It prevents running out of
addresses from the pool when consuming them quickly.  Here I have a
small pool sufficient for me but you might need to decrease times and
a larger pool.  But hopefully it gives you the idea.

class "volatile"  {
  match if substring(option vendor-class-identifier, 0, 3) = "d-i" or
           substring(option vendor-class-identifier, 0, 9) = "PXEClient" or
           substring(option vendor-class-identifier, 0, 9) = "Etherboot" or
           substring(option vendor-class-identifier, 0, 8) = "anaconda" or
           substring(option vendor-class-identifier, 0, 8) = "volatile";
}

subnet 192.168.42.0 netmask 255.255.255.0 {
  option subnet-mask 255.255.255.0;
  option routers 192.168.42.1;
  pool {
    failover peer "dhcp-failover-peers";
    range 192.168.42.200 192.168.42.240;
    deny members of "volatile";
    default-lease-time 43200;
    max-lease-time 86400;
  }
  pool {
    failover peer "dhcp-failover-peers";
    range 192.168.42.50 192.168.42.99;
    allow members of "volatile";
    default-lease-time 1800;
    max-lease-time 1800;
  }
}


------------------------------

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

End of dhcp-users Digest, Vol 89, Issue 14
******************************************

Reply via email to