<div dir="ltr"><div class="gmail_extra"><div><div class="gmail_signature" data-smartmail="gmail_signature">We have a similar use case - a subnet full of virtual machines that are sometimes all deleted and recreated.  The new vm's get new (random) MAC addresses, so we have to delete all the old leases from the DHCP server to make room for the new vm's to get addresses.</div></div><div class="gmail_signature" data-smartmail="gmail_signature"><br></div><div class="gmail_signature" data-smartmail="gmail_signature">-- </div><div class="gmail_signature" data-smartmail="gmail_signature">Bob Harold</div><div class="gmail_signature" data-smartmail="gmail_signature"><br></div>
<br><div class="gmail_quote">On Tue, Aug 22, 2017 at 10:37 AM, Hillary Nelson <span dir="ltr"><<a href="mailto:nelsonhillary8@gmail.com" target="_blank">nelsonhillary8@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>we've been using similar commands Thomas sent to release leases that know to be not needed --  our AP subnet lease time is set to 1 week, every once a while the wireless group order bunch new airports to test and have to contact us to release lease for them. <br><span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">Hillary    <br></font></span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 22, 2017 at 10:17 AM, Thomas Markwalder <span dir="ltr"><<a href="mailto:tmark@isc.org" target="_blank">tmark@isc.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Glenn:<br>
<br>
You are absolutely right.   Those commands only release the lease in<br>
terms of the server.<br>
The client would not be notified of the change as this is not part of<br>
the protocol.<br>
<span class="m_-1645222801166866012HOEnZb"><font color="#888888"><br>
Thomas<br>
</font></span><div class="m_-1645222801166866012HOEnZb"><div class="m_-1645222801166866012h5"><br>
<br>
<br>
On 8/22/17 9:50 AM, Glenn Satchell wrote:<br>
> That series of commands releases the lease in the server, so that the<br>
> server could then offer it to a different client. However, I don't believe<br>
> there is any part of the DHCP protocol for the server to contact the<br>
> client and tell it to release the lease. So the original client can<br>
> continue to use the address until the original lease time expires.<br>
><br>
> If the client did not respond to the ping before offer, the server could<br>
> then offer the lease to a second client.<br>
><br>
> regards,<br>
> Glenn Satchell<br>
><br>
> On Tue, August 22, 2017 11:38 pm, Thomas Markwalder wrote:<br>
>> Hello all:<br>
>><br>
>> It is possible to connect to ISC_DHCP via omshell and change the lease<br>
>> state to released as<br>
>> shown below.  The following example you're connecting from the machine<br>
>> ISC_DHCP<br>
>> is running on and you didn't specify a key in the server config:<br>
>><br>
>><br>
>> 1. Start omshell and connect to ISC DHCP:<br>
>><br>
>> ------------------------------<wbr>---------------<br>
>> centos64 isc_dhcp $ tip/bin/omshell<br>
>>> server localhost<br>
>>> port 7911<br>
>>> connect<br>
>> obj: <null><br>
>> ------------------------------<wbr>----------------<br>
>><br>
>><br>
>> 2. Create a new lease object and set the ip-address to<br>
>> the address of the desired lease:<br>
>> ------------------------------<wbr>----------------<br>
>>> new lease<br>
>> obj: lease<br>
>>> set ip-address=178.16.1.127<br>
>> omapi_set_value (ip-address, 4 18bed8c)<br>
>> Â ==> success<br>
>> obj: lease<br>
>> ip-address = b2:10:01:7f<br>
>> ------------------------------<wbr>----------------<br>
>><br>
>> 3. Fetch the lease via the open object command<br>
>> ------------------------------<wbr>----------------<br>
>>> open<br>
>> omapi_set_value (op, 1)<br>
>> Â ==> success<br>
>> Â Â  :<br>
>> Â Â  :<br>
>> obj: lease<br>
>> ip-address = b2:10:01:7f<br>
>> state = 00:00:00:02<br>
>> subnet = 00:00:00:02<br>
>> pool = 00:00:00:03<br>
>> hardware-address = 08:00:27:99:72:be<br>
>> hardware-type = 00:00:00:01<br>
>> ends = 59:9c:30:bc<br>
>> starts = 59:9c:2f:90<br>
>> tstp = 00:00:00:00<br>
>> tsfp = 00:00:00:00<br>
>> atsfp = 00:00:00:00<br>
>> cltt = 59:9c:2f:90<br>
>> flags = 00<br>
>> ------------------------------<wbr>----------------<br>
>><br>
>> 4. Set the lease state to FTS_RELEASED (i.e. 4)<br>
>> ------------------------------<wbr>----------------<br>
>> set state=4<br>
>> omapi_set_value (state, 4)<br>
>> Â ==> success<br>
>> obj: lease<br>
>> ip-address = b2:10:01:7f<br>
>> state = 4<br>
>> subnet = 00:00:00:02<br>
>> pool = 00:00:00:03<br>
>> hardware-address = 08:00:27:99:72:be<br>
>> hardware-type = 00:00:00:01<br>
>> ends = 59:9c:30:bc<br>
>> starts = 59:9c:2f:90<br>
>> tstp = 00:00:00:00<br>
>> tsfp = 00:00:00:00<br>
>> atsfp = 00:00:00:00<br>
>> cltt = 59:9c:2f:90<br>
>> flags = 00<br>
>> ------------------------------<wbr>----------------<br>
>><br>
>><br>
>> 5. Save the change via the update object command:<br>
>> ------------------------------<wbr>----------------<br>
>>> update<br>
>> omapi_set_value (op, 3)<br>
>> Â ==> success<br>
>> omapi_set_value (object, dhcpctl-remote)<br>
>> Â ==> success<br>
>> omapi_set_value (handle, 4)<br>
>> Â ==> success<br>
>> omapi_set_value (result, 4 18c03fc)<br>
>> Â ==> success<br>
>> obj: lease<br>
>> ip-address = b2:10:01:7f<br>
>> state = 4<br>
>> subnet = 00:00:00:02<br>
>> pool = 00:00:00:03<br>
>> hardware-address = 08:00:27:99:72:be<br>
>> hardware-type = 00:00:00:01<br>
>> ends = 59:9c:30:bc<br>
>> starts = 59:9c:2f:90<br>
>> tstp = 00:00:00:00<br>
>> tsfp = 00:00:00:00<br>
>> atsfp = 00:00:00:00<br>
>> cltt = 59:9c:2f:90<br>
>> flags = 00<br>
>> ------------------------------<wbr>----------------<br>
>><br>
>> omshell(1) discusses this in general terms.  dhcpd.conf(5) describes how<br>
>> to configure ISC_DHCP for OMAPI connections.<br>
>><br>
>><br>
>> Regards,<br>
>><br>
>> Thomas Markwalder<br>
>> ISC Software Engineering<br>
>><br>
>><br>
>> On 8/22/17 8:47 AM, perl-list wrote:<br>
>>> To my knowledge, there is no such method available. Â The client is<br>
>>> leased the address until a certain expire period. Â There is no way to<br>
>>> tell the client to stop using the address early. <br>
>>><br>
>>> ------------------------------<wbr>------------------------------<wbr>------------<br>
>>><br>
>>>     *From: *"Maneesh Kumar" <<a href="mailto:maneeshk@cdac.in" target="_blank">maneeshk@cdac.in</a>><br>
>>>     *To: *<a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br>
>>>     *Sent: *Tuesday, August 22, 2017 7:47:30 AM<br>
>>>     *Subject: *Mechanism for forcing release of lease from the DHCP<br>
>>>     server end<br>
>>><br>
>>>     Dear Members,<br>
>>><br>
>>>     Kindly let me know if there is a mechanism available for forcing<br>
>>>     release of lease from the DHCP server end.<br>
>>><br>
>>>     If yes, please let me know the way to achieve the same.<br>
>>><br>
>>><br>
>>>     Maneesh Kumar<br>
>>><br>
>>>     HPC Infrastructure and Ecosystem Group<br>
>>>     Centre for Development of Advanced Computing<br>
>>><br>
>>><br>
> ______________________________<wbr>_________________<br>
> dhcp-users mailing list<br>
> <a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br>
> <a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/<wbr>listinfo/dhcp-users</a><br>
<br>
<br>
______________________________<wbr>_________________<br>
dhcp-users mailing list<br>
<a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/<wbr>listinfo/dhcp-users</a></div></div></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
dhcp-users mailing list<br>
<a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/<wbr>listinfo/dhcp-users</a><br></blockquote></div><br></div></div>