<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">In order to solve this problem:<br>
      <br>
      Is one able to create something like:<br>
      <br>
      1. create subnet4_select hook<br>
       Inside hook based on some conditions we set NEXT_STEP_DROP/SKIP<br>
       subnet will not be selected<br>
      <br>
      2. create lease4_select hook<br>
       subnet is not selected yet, we use getCfgSubnets4()->getAll();
      and now we have all defined subnets<br>
       then we pick first subnet that matches relayip<br>
       we call Allocator and pickaddress. in case we don't get any
      address we pick another subnet and repeat<br>
       in case we go through all subnets/pools and don't get any address
      we decide to DROP packet because we don't have any free lease to
      handout<br>
      <br>
      Some help from Kea developers would be very appreciated :)<br>
      <br>
      Igor<br>
      <br>
      <br>
      On 12/20/2016 02:33 PM, Igor Smitran wrote:<br>
    </div>
    <blockquote
      cite="mid:95cf16d1-532d-93f4-f260-931ce4063dcb@gmail.com"
      type="cite">
      <meta content="text/html; charset=windows-1252"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">Disregard my last email :)<br>
        I have tested it in my setup and i am also having a problem with
        subnet classification based on relay ip.<br>
        In case of multiple subnets kea doesn't choose next subnet when
        first subnet pool is full, even though both subnets have same
        relay ip classification.<br>
        Because of this i am not able to implement kea in my network
        because i will have multiple subnets behind same relay ip.<br>
        <br>
        On 12/20/2016 12:29 PM, Igor Smitran wrote:<br>
      </div>
      <blockquote
        cite="mid:71170df6-436d-e4ff-65fa-939aa303839a@gmail.com"
        type="cite">
        <meta content="text/html; charset=windows-1252"
          http-equiv="Content-Type">
        <div class="moz-cite-prefix">Have you tried to setup one subnet
          that unifies all those pools, i.e. 192.168.97.64/27<br>
          and then define two pools in it?<br>
          <br>
          <br>
          On 12/14/2016 08:55 AM, Andrea Gabellini wrote:<br>
        </div>
        <blockquote
          cite="mid:f4f62c68-2e38-1702-dbfa-60a1fd40afe7@telecomitalia.sm"
          type="cite">
          <meta content="text/html; charset=windows-1252"
            http-equiv="Content-Type">
          <br>
          Hello,<br>
          <br>
          same problem here. Any hint or workaround?<br>
          <br>
          Andrea<br>
          <br>
          <blockquote
            cite="mid:f4d9d7b6-587d-3f14-2dd0-cedfe1021c0d@telecomitalia.sm"
            type="cite">
            <pre style="white-space: pre-wrap; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px;">I'm trying to configure Kea 1.1.0 to service DHCP leases for a BRAS/BNG
router (Juniper MX). The BNG relays from its loopback IP address, and might
have several different subscriber subnets. This is kind of like sections
7.5.1 and 7.5.2 in the User Guide -- except I have multiple subnets all in
the same class. This worked fine in ISC-DHCPD, but I can't get the
equivalent configuration working in Kea. Is this unsupported at this time,
or is there something I've overlooked?


i.e.:

"Dhcp4":
{
 ...
  "subnet4": [
  {    "subnet": "192.168.97.72/29",
       "id": 72,
       "option-data": [ { "name": "routers", "data": "192.168.97.75" } ],
       "relay": { "ip-address": "172.16.100.1" },
       "pools": [ { "pool": "192.168.97.75/32" } ] },
  {    "subnet": "192.168.97.88/29",
       "id": 88,
       "option-data": [ { "name": "routers", "data": "192.168.97.89" } ],
       "relay": { "ip-address": "172.16.100.1" },
       "pools": [ { "pool": "192.168.97.92/32" } ] },
  ]
},

With the above config, the first DHCP client gets the 192.168.97.75 IP
address. The second DHCP client gets no address, because subnet id 72
(192.168.9772/29)" is out of leases. The Kea server never even attempts to
allocate from the 192.168.97.88/29 subnet.

With ISC DHCPD, this shared network syntax accomplishes the desired results:

shared-network bngtest {
        # BNG's loopback lo0.x /32 relay IP
        subnet 172.16.100.1 netmask 255.255.255.255 {
        }
        subnet 192.168.97.72 netmask 255.255.255.248 {
        }
        pool {
                # this is the default pool for dynamic customers
                deny dynamic bootp clients; # DHCP is OK, BOOTP is not...
                range 192.168.97.75 192.168.97.75;
                option routers 192.168.97.73;
        }
        subnet 192.168.97.88 netmask 255.255.255.248 {
        }
        pool {
                # this is an overlay pool for dynamic customers
                deny dynamic bootp clients;
                range 192.168.97.92 192.168.97.92;
                option routers 192.168.97.89;
        }
}



Thanks!
-Adam</pre>
          </blockquote>
          <br>
          <pre class="moz-signature" cols="72">-- 
----------------------------------------------------------------
Access denied ... nah nah na nah nah !

----------------------------------------------------------------

Ing. Andrea Gabellini
Email: <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:andrea.gabellini@telecomitalia.sm">andrea.gabellini@telecomitalia.sm</a>
Skype: andreagabellini
Tel: (+378) 0549 886111
Fax: (+378) 0549 886188

Telecom Italia San Marino S.p.A.
Via XXVIII Luglio, 212 - Piano -2
47893 Borgo Maggiore
Republic of San Marino

<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.telecomitalia.sm">http://www.telecomitalia.sm</a></pre>
          <br>
          <fieldset class="mimeAttachmentHeader"></fieldset>
          <br>
          <pre wrap="">_______________________________________________
Kea-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Kea-users@lists.isc.org">Kea-users@lists.isc.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a>
</pre>
        </blockquote>
        <p><br>
        </p>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
Kea-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Kea-users@lists.isc.org">Kea-users@lists.isc.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a>
</pre>
      </blockquote>
      <p><br>
      </p>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Kea-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kea-users@lists.isc.org">Kea-users@lists.isc.org</a>
<a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a>
</pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>