<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="Droid Serif">I'm not sure this actually answers your
questions but Kea can handle host reservation conflicts on its
own. See section 8.3.2 [1] for details of how that works. I think
in general there are a few approaches to this issue:<br>
<br>
1. Don't assign a reserved IP address from the pool. This only
works if your pool is smaller then the entire subnet being served
and the IP addresses outside the pool are not already in use.<br>
2. Reserve a known unused IP address and then wait to ensure that
the IP address was not picked up by another system sometime
between discovery of the unused address and defining the
reservation <b>BEFORE</b> calling the DHCPDISCOVER from the
intended host. This way you are guaranteed that the reserved IP
address will not be used by another system.<br>
3. Same as #2, but reserve any IP address and just wait for the
DHCP server to deny the renewal of the soon-to-be-reserved IP
address.<br>
<br>
In the case where you cannot wait for the host reservation then
just define reservation and let Kea resolve the conflict as
described in section 8.3.2 [1] of the documentation. This, of
course, will mean that your new host will get a temporary address
until the reserved address is available.<br>
<br>
[1]
<a class="moz-txt-link-freetext" href="https://kea.readthedocs.io/en/kea-1.6.1/arm/dhcp4-srv.html#conflicts-in-dhcpv4-reservations">https://kea.readthedocs.io/en/kea-1.6.1/arm/dhcp4-srv.html#conflicts-in-dhcpv4-reservations</a></font><br>
<br>
<div class="moz-cite-prefix">On 5/6/20 1:28 PM, Chad Catlett wrote:<br>
</div>
<blockquote type="cite"
cite="mid:68915a8d-a87c-a3e2-f7b2-9dd833a45bc1@catlett.info">Hello,
<br>
<br>
We are using the subscriber hooks, currently running 1.6.1.
<br>
<br>
We currently have a subnet with 1000+ leases and we have a need to
create host reservations for some new devices that will be on the
subnet.
<br>
<br>
I am attempting to figure out the most sound way of finding
available IPs. We can get a list of leases for the subnet via the
API, and then find a free IP. Our concern is that this subnet sees
a ton of dhcp traffic and there is the risk of us finding a free
IP and it being given out as a lease before we have a chance to
submit an API request to add the lease.
<br>
<br>
I was hoping there was some kind of argument that we could pass in
via the API that causes it to auto assign an available IP, but
that doesn't seem to be possible.
<br>
<br>
How are others solving this in a way that creates zero to very
tiny risk of conflicts.
<br>
<br>
Thanks,
<br>
<br>
Chad
<br>
<br>
--
<br>
Chad Catlett
<br>
<a class="moz-txt-link-abbreviated" href="mailto:chad@catlett.info">chad@catlett.info</a>
<br>
_______________________________________________
<br>
Kea-users mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Kea-users@lists.isc.org">Kea-users@lists.isc.org</a>
<br>
<a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="0">--
Thanks,
Joshua Schaeffer</pre>
</body>
</html>