<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 10/4/2014 5:11 AM, Chris wrote:<br>
    </div>
    <blockquote
      cite="mid:db8bed09cf893b5615cb5b0b86681c9e@hasty.vp44.net"
      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: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
<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>
    <tt>Looks like to me you do NOT have a shared-network. Quoting your
      post:<br>
    </tt><font color="#000099">* dhcp/dns server and router is
      10.0.1.3/255.255.255.0
    </font><tt><font color="#000099"><br>
      </font>Your subnet mask says one subnet.<br>
      <br>
      You might try:<br>
      <font color="#993300">class "long_term" {<br>
          match hardware;<br>
        <br>
          default-lease-time 604800;<br>
          max-lease-time 864000;<br>
        }<br>
        # other "long_term" devices:<br>
        subclass "long_term" 01:xx:xx:xx:xx:xx:xx;  # non fixed-address
        device - replace with MAC<br>
        <br>
        <br>
        # fixed-address doesn't go in pool<br>
        group {<br>
          default-lease-time 604800;<br>
          max-lease-time 864000;<br>
        <br>
          host solaredge1 {<br>
            hardware ethernet 00:27:02:10:65:49;<br>
            fixed-address pv-inverter1.local.lan;<br>
          }<br>
        <br>
          host solaredge2 {<br>
            hardware ethernet 00:27:02:10:30:21;<br>
            fixed-address pv-inverter2.local.lan;<br>
          }               <br>
        <br>
          host cctv-dvr {<br>
            hardware ethernet 00:19:fb:e2:ab:1b;<br>
            fixed-address cctv.local.lan;<br>
          }<br>
        }<br>
        <br>
        <br>
        subnet 10.0.1.0 netmask 255.255.255.0 {<br>
          range 10.0.1.65 10.0.1.126;<br>
          option routers 10.0.1.3;<br>
          option ntp-servers 10.0.1.3;<br>
        # don't want this:<br>
        #  option broadcast-address 10.0.1.127;<br>
          option domain-name "local.lan";<br>
          option domain-name-servers 10.0.1.3;<br>
        <br>
        # long term<br>
          pool {<br>
            allow members of "long_term";<br>
            deny dynamic bootp clients;  <br>
        <br>
            range 10.0.1.128 10.0.1.142;<br>
          }<br>
        <br>
        # short term<br>
          pool {<br>
            allow unknown clients;<br>
            deny members of "long_term";<br>
            deny dynamic bootp clients;  <br>
        <br>
            default-lease-time 10800;<br>
            max-lease-time 21600;<br>
        <br>
            range 10.0.1.65 10.0.1.126;<br>
          }<br>
        }<br>
      </font><br>
      Hope this helps,<br>
      Bill<br>
      <br>
    </tt>
  </body>
</html>