Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
21.1 Legacy Series
»
DHCP: Any way to set maximum lease time to "infinite" for static mappings?
« previous
next »
Print
Pages: [
1
]
Author
Topic: DHCP: Any way to set maximum lease time to "infinite" for static mappings? (Read 3840 times)
Asperamanca
Newbie
Posts: 31
Karma: 0
DHCP: Any way to set maximum lease time to "infinite" for static mappings?
«
on:
February 21, 2021, 05:07:11 pm »
So the default lease time is one day, even for statically mapped IP addresses. I understand now why my Wifi AP complains once a day that is was disconnected
The ugly solution is to enter a ridiculously high value (2^31 comes to mind, since I don't know whether the value is stored signed or unsigned). As an engineer, this solution is not very satisfying. Is there a default "disable maximum lease time" option?
Logged
chemlud
Hero Member
Posts: 2485
Karma: 112
Re: DHCP: Any way to set maximum lease time to "infinite" for static mappings?
«
Reply #1 on:
February 21, 2021, 06:30:31 pm »
https://lazyadmin.nl/home-network/dhcp-lease-time/
Logged
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare
felix eichhorns premium katzenfutter mit der extraportion energie
A router is not a switch - A router is not a switch - A router is not a switch - A rou....
Asperamanca
Newbie
Posts: 31
Karma: 0
Re: DHCP: Any way to set maximum lease time to "infinite" for static mappings?
«
Reply #2 on:
February 28, 2021, 02:54:25 pm »
Interesting. Since I upped the maximum lease time, I no longer my Wifi AP's "device has been disconnected" error once every 24 hours.
Seems like not every device knows it needs to renew the lease...
Logged
Maurice
Hero Member
Posts: 1213
Karma: 158
Re: DHCP: Any way to set maximum lease time to "infinite" for static mappings?
«
Reply #3 on:
February 28, 2021, 07:00:42 pm »
I've seen this once with a certain Cisco switch. It never renewed its DHCP lease. After the lease expired, the switch was left without an IP address and the management interface became unreachable.
Workaround: One year lease time.
Regarding infinite leases: Setting default-lease-time / max-lease-time in the dhcpd.conf to -1 should have this effect. But I'm not sure whether the OPNsense UI allows this.
Logged
OPNsense virtual machine images
OPNsense aarch64 firmware repository
Commercial support & engineering available. PM for details (en / de).
Asperamanca
Newbie
Posts: 31
Karma: 0
Re: DHCP: Any way to set maximum lease time to "infinite" for static mappings?
«
Reply #4 on:
February 28, 2021, 09:03:19 pm »
The maximum setting that fits into a 32bit signed int is more than 60 years. That should do. I also only set this to specific static leases where I encounter these problems.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
21.1 Legacy Series
»
DHCP: Any way to set maximum lease time to "infinite" for static mappings?