[Kea-users] Unable To Support Multiple Subnets via DHCP Relay

Igor Smitran viruslaki at gmail.com
Thu Dec 22 13:42:12 UTC 2016


In order to solve this problem:

Is one able to create something like:

1. create subnet4_select hook
  Inside hook based on some conditions we set NEXT_STEP_DROP/SKIP
  subnet will not be selected

2. create lease4_select hook
  subnet is not selected yet, we use getCfgSubnets4()->getAll(); and now 
we have all defined subnets
  then we pick first subnet that matches relayip
  we call Allocator and pickaddress. in case we don't get any address we 
pick another subnet and repeat
  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

Some help from Kea developers would be very appreciated :)

Igor


On 12/20/2016 02:33 PM, Igor Smitran wrote:
> Disregard my last email :)
> I have tested it in my setup and i am also having a problem with 
> subnet classification based on relay ip.
> 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.
> Because of this i am not able to implement kea in my network because i 
> will have multiple subnets behind same relay ip.
>
> On 12/20/2016 12:29 PM, Igor Smitran wrote:
>> Have you tried to setup one subnet that unifies all those pools, i.e. 
>> 192.168.97.64/27
>> and then define two pools in it?
>>
>>
>> On 12/14/2016 08:55 AM, Andrea Gabellini wrote:
>>>
>>> Hello,
>>>
>>> same problem here. Any hint or workaround?
>>>
>>> Andrea
>>>
>>>> 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
>>>
>>> -- 
>>> ----------------------------------------------------------------
>>> Access denied ... nah nah na nah nah !
>>>
>>> ----------------------------------------------------------------
>>>
>>> Ing. Andrea Gabellini
>>> Email:andrea.gabellini at telecomitalia.sm
>>> 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
>>>
>>> http://www.telecomitalia.sm
>>>
>>>
>>> _______________________________________________
>>> Kea-users mailing list
>>> Kea-users at lists.isc.org
>>> https://lists.isc.org/mailman/listinfo/kea-users
>>
>>
>>
>>
>> _______________________________________________
>> Kea-users mailing list
>> Kea-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/kea-users
>
>
>
>
> _______________________________________________
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20161222/5d60a751/attachment.htm>


More information about the Kea-users mailing list