Multiple class setup

Glenn Satchell glenn.satchell at uniq.com.au
Sat Oct 4 10:02:05 UTC 2014


Hi Chris

Defining a host record inside a subnet does not cause that host to be
bound or in any way assigned to that subnet. A host definition is, by
definition a global statement.

You need a way to differentiate the two different types of client so they
are restricted to their specific subnet. A client defined in a host
statement is a "known-client", so in your case there are two things to do
to fix the situation:

1) move the host statements outside the subnet and shared-network
definitions.

2) in the first subnet add a pool and deny statement, move the range into
the pool:
        pool {
                 range 10.0.1.65 10.0.1.126;
                 allow unknown-clients;
        }
                 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;

   similarly, in the second subnet add a pool and allow statement, move
the range into the pool:

       pool {
                range 10.0.1.128 10.0.1.142;
                deny unknown-clients;
       }
       # rest of the original subnet statements ...

There is an example in the ADDRESS POOLS section of the dhcpd.conf man page.

regards,
-glenn


On Sat, October 4, 2014 7:11 pm, 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
>




More information about the dhcp-users mailing list