Multiple class setup

Chris chris at vp44.net
Sat Oct 4 09:11:56 UTC 2014


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




More information about the dhcp-users mailing list