Move dhcp lease to new ip+reservation. How?

Gregory Sloop gregs at sloop.net
Fri Aug 27 16:35:28 UTC 2021


An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20210827/ada49aee/attachment.htm>
-------------- next part --------------
I like this approach best, since it's kind of where I started heading as I thought about it. 
(Though Glenn's also has promise. Thanks to you both!)
 
However, I've kind of struggled at knowing exactly what OMAPI commands to use to create the skeleton lease (What I've tried doesn't work) and what, exactly, to do to "expire" the "old" lease. (There doesn't appear to be any way to remove the lease - it looks like all you can do is expire it. (Though I'm not sure if setting the end-time to 0, or something else is the "way" to do it.)

Simon - if you have scripts I could look at, it would be very handy - or at least tell me what attributes you set (and to what).
OMAPI and I don't get on very well. (I feel like a bumbling fool any time I try to figure out how to do anything in it.)
 
TIA!
 

> Gregory Sloop <gregs at sloop.net> wrote:

>> I've thought about pre-creating leases for 51-70 and essentially adding "bogus" information for those leases and reserving them. (While allowing unknown-clients for the 51-70 pool - but since they're all "taken" it won't hand one out),  Then when I want to move something there, I can remove the "bogus" reservation and move the "real" lease to the appropriate IP in the 51-70 block/pool.

> That’s what I’ve done for a small pool I’ve created at home for some devices - I wanted to segregate (isolate) some IoT stuff that others insist on having in the house.
> When you move the device, as well as assigning it to the reserved lease (which as you’ve probably realised, only initially needs to be a skeleton entry with MAC, IP, and the reserved flag), you need to remove it’s other lease(s) to ensure that it changes address.

> I don’t run failover, so I don’t know what you’ll need to do in terms of making the two servers agree on the details - e.g. whether it’s enough to do it on one with OMAPI and it’ll get copied by the failover setup, or whether you have to do it to both servers separately.

> Simon


More information about the dhcp-users mailing list