[Kea-users] Select subnet based on reservation?

Tomek Mrugalski tomasz at isc.org
Wed Feb 8 19:11:10 UTC 2017


W dniu 08.02.2017 o 16:18, Bryan Perry pisze:
> Since getting this library functional in May I have had roughly 6 to 8
> instances where the Kea process just dies and goes away. I am not sure
> why or if it is an issue with my library, kea itself or the CentOS
> machine it's running on. After the first two instances of this happening
I'm very sorry to hear that. Are you willing to share more information
about this, possibly off the list? I'm not aware of any issues in Kea
that would cause such a termination.

Do you have the log files Kea produced immediately before the process
died? Was it happening randomly or after very long operation? Are you
sure your MySQL DB was always on-line? In Kea 1.0 we implemented a
mechanism that when DB connection issue is encountered, Kea logs the
problem and terminates (because without DB connection it can't do
anything useful anyway and remaining in that state would be difficult to
spot.). Maybe that was the case? If not, I'm more than willing to spend
some time trying to debug the issue, if you're interested.

> On the shared subnet handling I have another scalability challenge in my
> network. The upstream router that is acting as my DHCP relay will always
> send the client request from its primary IP address. This even killed
> regular DHCP lease responses from a second subnet since the request came
> from the first subnet ID. In order to get around this I had to enable a
> feature of that router that would try sending the DHCP requests from
> each secondary IP address after a DHCP request failure on the primary
> address. This works, but takes several seconds for the failure on the
> primary and then the request on the secondary. The time delay gets
> longer and longer the more subnets it has to get failures on while its
> going down the list. That's a painful delay trying to get an IP address
> on the network if you are in a subnet further down the list.
Are you talking about sending relayed messages towards the server?
That shouldn't work that way. The source IP address the relay uses to
send the packet from towards the server shouldn't matter. The important
part is what the relay puts into the giaddr field.

> The last requirement I have that has also been handled via the library I
> wrote for Kea has been logging lease assignments to a database for
> historical purposes (summons, subpoenas, etc.).
This can be handled by the forensic logging library. Yes, it's available
only for people who support Kea financially, but we need to fund Kea
development somehow.

> Basically, until the shared subnet functionality works in Kea the way it
> does in DHCPD I don't really have a choice but to use DHCPD and put
> lease reservations for my static customers in the config file. 
Understood. Thanks for sharing those details. These are very useful,
especially for the design phase for proper shared subnet solution.

>>> // subnet4_select.cc
>>>
>>> #include <hooks/hooks.h>
>>> #include <dhcp/pkt4.h>
>>> ...
Thanks for sharing the code. That's very useful. Have you considered
publishing it somewhere (github maybe)?

This approach works, but it covers only some of the use cases for shared
subnets. It's sufficient for your deployment, but may not be applicable
to other deployments. There are two limitations with this approach. The
first one is that you effectively turned this into a global reservation.
That means one host can't have reservations in different parts of your
network. If you only have fixed clients, that's fine. Another limitation
(which is more problematic) is that it does not allow dynamic
allocation, so you need a static entry for all of your clients (or they
will get the addresses from the first subnet).

I'm not complaining, simply pointing out its properties in case someone
tries to use this code for such scenarios.

Tomek




More information about the Kea-users mailing list