Sending different values for the same option to different classes of hardware within the same pool
Glenn Satchell
Glenn.Satchell at uniq.com.au
Mon Jan 11 05:50:48 UTC 2010
It's a little more complex than that. The OP said he has different
types of hardware, and for each hardware type he needs a different
setting based on the subnet.
So classes can provide tha basic hardware differentiation. Within each
subnet you could do a few different ways. One would be to have a
separate pool for each hardware class. In that pool you could put the
specific settings. Something like this:
class "vendor1" {
match if option .... ;
}
class "vendor2 {
match if option .... ;
}
subnet 192.168.10.0 netmask 255.255.255.0 {
option router ... ;
pool {
allow members of "vendor1";
range 192.168.10.100 19.168.10.149;
next-server 192.168.10.1;
}
pool {
allow members of "vendor2";
range 192.168.10.150 192.168.10.199;
next-server 192.168.10.2;
}
}
and so on. Make the size of each range big enough to allow for the expected
numbers of each vendor type.
Another way would be to use a if/else arrangement in each subnet
subnet 192.168.10.0 netmask 255.255.255.0 {
option router ... ;
if option .... = "vendor1" {
next-server 192.168.10.1;
} elsif option ... = "vendor2" {
next-server 192.168.10.2;
}
pool {
range 192.168.10.100 19.168.10.199;
}
}
I hope that gives you some ideas to work with. Neither is terribly
convenient if you have a lot of different hardware types and subnets.
class, match are covered in the dhcpd.conf man page; options are in the
dhcp-options man page; and if/elsif are in the dhcp-eval man page.
regards,
-glenn
>From: Chris Buxton <chris.p.buxton at gmail.com>
>Date: Sun, 10 Jan 2010 23:29:17 -0500
>
>Use classes to identify your different types of hardware. Then you should be
able to use pools inside each subnet, along with allow/deny, to differentiate
based on class.
>
>Chris Buxton
>
>On Jan 10, 2010, at 8:58 AM, Antonio Goméz Soto wrote:
>
>> Hi,
>>
>> Initially I tried putting them into the class definition.
>>
>> But the values of these options also vary depending on
>> the network they are on.
>>
>> How can I achieve this?
>>
>> Thanks,
>> Antonio
>>
>> _______________________________________________
>> 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
>
More information about the dhcp-users
mailing list