<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFCC" text="#000000">
    There is also the question of what the addresses in the host
    statements are.<br>
    <br>
    The addresses (looked up from DNS) determine which subnet the hosts
    appear in, the placement of the host statements do NOT have any
    influence on that (as also Glenn states).<br>
    <br>
    <div class="moz-cite-prefix">On 04/10/14 12.02, Glenn Satchell
      wrote:<br>
    </div>
    <blockquote
      cite="mid:39098ebb7309608494caa6c16239fc50.squirrel@mail.uniq.com.au"
      type="cite">
      <pre wrap="">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:
</pre>
      <blockquote type="cite">
        <pre wrap="">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:<a class="moz-txt-link-freetext" href="fb:e2:ab:1b">fb:e2:ab:1b</a>;
                        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
<a class="moz-txt-link-abbreviated" href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a>
<a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/dhcp-users">https://lists.isc.org/mailman/listinfo/dhcp-users</a>

</pre>
      </blockquote>
      <pre wrap="">

_______________________________________________
dhcp-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a>
<a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/dhcp-users">https://lists.isc.org/mailman/listinfo/dhcp-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Best regards

Sten Carlsen

No improvements come from shouting:

       "MALE BOVINE MANURE!!!" 
</pre>
  </body>
</html>