Move dhcp lease to new ip+reservation. How?

Simon dhcp1 at thehobsons.co.uk
Fri Aug 27 16:53:27 UTC 2021


Gregory Sloop <gregs at sloop.net> wrote:

> 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.)

I just stop the server and edit the leases file - I only run a home server these days. I never did run anything “big enough” that I needed to do online maintenance and never used OMAPI.

All you need to create for a skeleton lease is (from memory) :

lease {
  hardware 1:xx......;
  address 192.168....;
  reserved;
}

The server will fill in the rest as it goes.

Simon



More information about the dhcp-users mailing list