Mechanism for forcing release of lease from the DHCP server end
Thomas Markwalder
tmark at isc.org
Tue Aug 22 13:38:29 UTC 2017
Hello all:
It is possible to connect to ISC_DHCP via omshell and change the lease
state to released as
shown below. The following example you're connecting from the machine
ISC_DHCP
is running on and you didn't specify a key in the server config:
1. Start omshell and connect to ISC DHCP:
---------------------------------------------
centos64 isc_dhcp $ tip/bin/omshell
> server localhost
> port 7911
> connect
obj: <null>
>
----------------------------------------------
2. Create a new lease object and set the ip-address to
the address of the desired lease:
----------------------------------------------
> new lease
obj: lease
> set ip-address=178.16.1.127
omapi_set_value (ip-address, 4 18bed8c)
==> success
obj: lease
ip-address = b2:10:01:7f
>
----------------------------------------------
3. Fetch the lease via the open object command
----------------------------------------------
> open
omapi_set_value (op, 1)
==> success
:
:
obj: lease
ip-address = b2:10:01:7f
state = 00:00:00:02
subnet = 00:00:00:02
pool = 00:00:00:03
hardware-address = 08:00:27:99:72:be
hardware-type = 00:00:00:01
ends = 59:9c:30:bc
starts = 59:9c:2f:90
tstp = 00:00:00:00
tsfp = 00:00:00:00
atsfp = 00:00:00:00
cltt = 59:9c:2f:90
flags = 00
>
----------------------------------------------
4. Set the lease state to FTS_RELEASED (i.e. 4)
----------------------------------------------
set state=4
omapi_set_value (state, 4)
==> success
obj: lease
ip-address = b2:10:01:7f
state = 4
subnet = 00:00:00:02
pool = 00:00:00:03
hardware-address = 08:00:27:99:72:be
hardware-type = 00:00:00:01
ends = 59:9c:30:bc
starts = 59:9c:2f:90
tstp = 00:00:00:00
tsfp = 00:00:00:00
atsfp = 00:00:00:00
cltt = 59:9c:2f:90
flags = 00
>
----------------------------------------------
5. Save the change via the update object command:
----------------------------------------------
> update
omapi_set_value (op, 3)
==> success
omapi_set_value (object, dhcpctl-remote)
==> success
omapi_set_value (handle, 4)
==> success
omapi_set_value (result, 4 18c03fc)
==> success
obj: lease
ip-address = b2:10:01:7f
state = 4
subnet = 00:00:00:02
pool = 00:00:00:03
hardware-address = 08:00:27:99:72:be
hardware-type = 00:00:00:01
ends = 59:9c:30:bc
starts = 59:9c:2f:90
tstp = 00:00:00:00
tsfp = 00:00:00:00
atsfp = 00:00:00:00
cltt = 59:9c:2f:90
flags = 00
----------------------------------------------
omshell(1) discusses this in general terms. dhcpd.conf(5) describes how
to configure ISC_DHCP for OMAPI connections.
Regards,
Thomas Markwalder
ISC Software Engineering
On 8/22/17 8:47 AM, perl-list wrote:
> To my knowledge, there is no such method available. The client is
> leased the address until a certain expire period. There is no way to
> tell the client to stop using the address early.
>
> ------------------------------------------------------------------------
>
> *From: *"Maneesh Kumar" <maneeshk at cdac.in>
> *To: *dhcp-users at lists.isc.org
> *Sent: *Tuesday, August 22, 2017 7:47:30 AM
> *Subject: *Mechanism for forcing release of lease from the DHCP
> server end
>
> Dear Members,
>
> Kindly let me know if there is a mechanism available for forcing
> release of lease from the DHCP server end.
>
> If yes, please let me know the way to achieve the same.
>
>
> Maneesh Kumar
>
> HPC Infrastructure and Ecosystem Group
> Centre for Development of Advanced Computing
>
> -------------------------------------------------------------------------------------------------------------------------------
> [ C-DAC is on Social-Media too. Kindly follow us at:
> Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]
>
> This e-mail is for the sole use of the intended recipient(s) and may
> contain confidential and privileged information. If you are not the
> intended recipient, please contact the sender by reply e-mail and
> destroy
> all copies and the original message. Any unauthorized review, use,
> disclosure, dissemination, forwarding, printing or copying of this
> email
> is strictly prohibited and appropriate legal action will be taken.
> -------------------------------------------------------------------------------------------------------------------------------
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
>
>
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20170822/0bb10f8a/attachment.html>
More information about the dhcp-users
mailing list