DHCP Leases: Button to Remove

how do you set infinite lease? I leave it blank on lease time but seems it doesn't do infinite

Use 'Set Static' in DHCP leases on the Status Page.
Under DHCP and DNS/Static Leases edit the lease, choose Lease time, set to 'static' and wait for the current lease to expire.

Huh, I did not know that.

I wonder why they lie. :confused:
:spiral_notepad:

While DHCP leases and Static leases both use the word lease, they are not the same type of lease.

You don't even have to tell the router about a static lease if it is manually set up correctly. Just keep it out of the pool.

I get this.
It is not DHCP if it is static. You can shove a timer on it using DHCP.

I went through this too.

I just upgraded; here are all DHCP leases OpenWrt assinged or is running a timer on in the background (since my static leases are infinite, they are not even greyed out):

Here are my static leases:

DHCP is unaware of the devices but the router knows about them because I've configured those two.

That is incorrect. While the "static"/"dynamic" terminology around DHCP leases is a bit muddled, yes, they are exactly the same type of lease. When we talk about a "static lease" we take it to mean that the DHCP server has been instructed to always give out the same lease to the same client. Otherwise they are exactly the same as "dynamic" DHCP leases, and the DHCP client would not even know they are "static".

What you are confusing/conflating with a "static lease", and what you have, is devices configured with a static IP. Those devices are not in a dialogue with the server, never request a lease, and are never given a lease. That's why "they are not even greyed out" in your list of active DHCP leases, they will never show up in that list in the first place.

Since you chose to If you set the static IPs of your two devices within the DHCP server's pool of addresses to give out, "static leases" are a way of telling the DHCP server not to give out those addresses to anyone and potentially cause address collisions. Usually, though, clients with static IPs that are supposed to stay on static IPs are given IPs outside of the DHCP pool.

2 Likes

Yeah, if you have been setting up lans since 10base5...

but who of those are around?

Kids today have it easy with DHCP; when I was a kid the Ohio river froze solid and we had to terminate the lan...
I hear you singing Carly!!!

Well . . . :wave:

2 Likes

my bad.

/s

1 Like

I stand corrected. But why then have them in your static leases in the first place? If you need to address them by their hostnames, that's what the "hostnames" tab is for, one over from "static leases".

I smell roasted Almonds and M&Ms.

While a static lease lets you set a hostname, setting hostnames is not the primary purpose of static leases (that the hostname is optional should give you that hint), and especially not for hosts with static IPs.