Multiple class setup
Bill Shirley
Bill at Henagar.PolymerIndustries.biz
Sat Oct 4 22:32:56 UTC 2014
On 10/4/2014 5:11 AM, Chris wrote:
> Hi all.
> I'm trying to configure the dhcp server to grant leases in same subnet but
> different cidr classes however it doesn't appear to be working:
>
> * dhcp/dns server and router is 10.0.1.3/255.255.255.0
> * any dhcp request should get a short term lease in 10.0.1.64/26
> * dhcp requests from specified mac addresses get long term lease in
> 10.0.1.128/28
>
> shared-network local {
>
> # short term
> subnet 10.0.1.64 netmask 255.255.255.192 {
> range 10.0.1.65 10.0.1.126;
> option routers 10.0.1.3;
> option ntp-servers 10.0.1.3;
> option broadcast-address 10.0.1.127;
> option domain-name "local.lan";
> option domain-name-servers 10.0.1.3;
>
> default-lease-time 10800;
> max-lease-time 21600;
> }
>
> # long term
> subnet 10.0.1.128 netmask 255.255.255.240 {
> range 10.0.1.128 10.0.1.142;
> option routers 10.0.1.3;
> option ntp-servers 10.0.1.3;
> option broadcast-address 10.0.1.143;
> option domain-name "local.lan";
> option domain-name-servers 10.0.1.3;
>
> default-lease-time 604800;
> max-lease-time 864000;
>
> host solaredge1 {
> hardware ethernet 00:27:02:10:65:49;
> fixed-address pv-inverter1.local.lan;
> }
>
> host solaredge2 {
> hardware ethernet 00:27:02:10:30:21;
> fixed-address pv-inverter2.local.lan;
> }
>
> host cctv-dvr {
> hardware ethernet 00:19:fb:e2:ab:1b;
> fixed-address cctv.local.lan;
> }
>
>
> }
> }
>
> Hostnames in the "long term" range have corresponding A and PTR records in the
> dns zone but they still get "short term" IPs assigned.
> What's the right way to implement the setup?
> Thanks
>
> -Chris
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
Looks like to me you do NOT have a shared-network. Quoting your post:
* dhcp/dns server and router is 10.0.1.3/255.255.255.0
Your subnet mask says one subnet.
You might try:
class "long_term" {
match hardware;
default-lease-time 604800;
max-lease-time 864000;
}
# other "long_term" devices:
subclass "long_term" 01:xx:xx:xx:xx:xx:xx; # non fixed-address device - replace with MAC
# fixed-address doesn't go in pool
group {
default-lease-time 604800;
max-lease-time 864000;
host solaredge1 {
hardware ethernet 00:27:02:10:65:49;
fixed-address pv-inverter1.local.lan;
}
host solaredge2 {
hardware ethernet 00:27:02:10:30:21;
fixed-address pv-inverter2.local.lan;
}
host cctv-dvr {
hardware ethernet 00:19:fb:e2:ab:1b;
fixed-address cctv.local.lan;
}
}
subnet 10.0.1.0 netmask 255.255.255.0 {
range 10.0.1.65 10.0.1.126;
option routers 10.0.1.3;
option ntp-servers 10.0.1.3;
# don't want this:
# option broadcast-address 10.0.1.127;
option domain-name "local.lan";
option domain-name-servers 10.0.1.3;
# long term
pool {
allow members of "long_term";
deny dynamic bootp clients;
range 10.0.1.128 10.0.1.142;
}
# short term
pool {
allow unknown clients;
deny members of "long_term";
deny dynamic bootp clients;
default-lease-time 10800;
max-lease-time 21600;
range 10.0.1.65 10.0.1.126;
}
}
Hope this helps,
Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20141004/658a432a/attachment.html>
More information about the dhcp-users
mailing list