Class matching

Bill Shirley Bill at Henagar.PolymerIndustries.biz
Mon Sep 29 21:12:19 UTC 2014


It has been my experience so far that a device can be in more that one class.
[1:root at apinetstore dhcp]$ rpm -qa | grep dhcp
dhcp-4.2.5-23.fc19.x86_64
dhcp-libs-4.2.5-23.fc19.x86_64
dhcp-common-4.2.5-23.fc19.x86_64

Example:
                 pool {
                         failover peer "dhcp-failover";
                         set pool_type = "Printers";
                         allow members of "Printers";
                         allow members of "JetDirect";
                         allow members of "Panasonic";
                         allow members of "Ricoh";
                         allow members of "Canon";
                         allow members of "Kyocera";
                         allow members of "Brother";
                         deny members of "Pack.1";
                         deny members of "Pack.2";
                         deny dynamic bootp clients;
                 option routers                  10.96.0.9;
                         range 10.98.128.1       10.98.128.253;
                         range 10.98.129.1       10.98.129.253;
                 }
                 pool {
                         failover peer "dhcp-failover";
                         set pool_type = "Pack.1";
                         allow members of "Pack.1";
                         deny dynamic bootp clients;
                 option routers                  10.96.0.9;
                         range 10.100.1.32       10.100.1.253;
                 }
We have JetDirect printers on "Pack.1" that get a range 10.100.1.32       10.100.1.253 address.


Bill

On 9/29/2014 4:44 PM, Adam Moffett wrote:
> Perhaps my information is out of date, but last I knew a device couldn't actually belong to two classes.
>
> I was once trying to do something similar to what you're doing with the printers, but you don't really know whether it 
> will end up in the first class or the second, other than knowing it will only be in one of them.
>
>
>> I don't know, but honestly, in my case here, I've just included the "match if" from the subgroup again to include the 
>> device in the larger group and used comments to indicate what that subgroup was.
>>
>> I presume you have something that needs to happen to members of some subgroups and something different that needs to 
>> happen to members of other subgroups, but you have something in common that needs to happen to all of them?
>>
>> Patrick
>>
>> ------------------------------------------------------------------------------------------------------------------------
>> *From:* dhcp-users-bounces at lists.isc.org [dhcp-users-bounces at lists.isc.org] on behalf of Bill Shirley 
>> [Bill at Henagar.PolymerIndustries.biz]
>> *Sent:* Monday, September 29, 2014 3:28 PM
>> *To:* Users of ISC DHCP
>> *Subject:* Class matching
>>
>> Is there a way to include a device in a class based on its membership in another class?:
>> class "Kyocera" {
>>         match if substring(hardware, 1,3) = 00:c0:ee;
>>         set member_of = "Kyocera";
>> }
>> class "Brother" {
>>         match if substring(hardware, 1,3) = 30:05:5C;
>>         set member_of = "Brother";
>> }
>>
>> Such as:
>> class "Printers" {
>>         match if (
>>             option server.class = "Kyocera"
>>             or option server.class = "Brother"
>>         );
>> }
>> if so, what do a replace "option server.class" with?
>>
>> I've also tried using the variable "member_of" set above:
>> class "Printers" {
>>        match if (
>>                member_of = "Kyocera"
>>                or member_of = "Brother"
>>        );
>> }
>> which doesn't work.
>>
>> TIA,
>> Bill
>>
>>
>>
>> _______________________________________________
>> dhcp-users mailing list
>> dhcp-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/dhcp-users
>
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20140929/38c583d0/attachment-0001.html>


More information about the dhcp-users mailing list