Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
23.7 Legacy Series
»
DHCPv4 Server is DHCPACKing addresses which are in use as static lease
« previous
next »
Print
Pages: [
1
]
Author
Topic: DHCPv4 Server is DHCPACKing addresses which are in use as static lease (Read 761 times)
pbk
Newbie
Posts: 22
Karma: 2
DHCPv4 Server is DHCPACKing addresses which are in use as static lease
«
on:
January 17, 2024, 07:51:19 pm »
This is a weird issue and I'm watching this happening for some time now.
Attached is a screenshot from the DHCP log. You can see that the server is giving a DHCPACK for a client asking for reusing an issued IP sometimes in the past.
Next screenshot is the static IP section from the corresponding DHCP. As you can see, the same IP is set as static for a different MAC.
This should never happen.
What I was able to observe is this:
- If a client is receiving a dynamic lease for an ip and then is switched off and (even if the lease is removed) then…
- this IP is made static for a different device…
- OPNsense is accepting the lease request from the client requesting the renewal of the lease it was given some time ago
This seems happening if this specific scenario occurs. Rebooting OPNsense will not fix it. Deleting the dynamic lease will not fix it. Actively making the client release the ip and request a new one is the only way to fix it. But this should be DHCP servers job. It seems as if the OPNsense DHCP is just not checking what IPs are set to static when receiving a renewal request.
The third screenshot is the leases view with the static and the wrongly leased dynamic IP. The moment the address is handed out as dynamic, the shown status for the device with the static IP will switch from online to offline. But take this with a grain of salt – the online/offline status is nothing reliable and can change erratically.
Version 23.7.11
«
Last Edit: January 17, 2024, 08:04:26 pm by pbk
»
Logged
Monviech (Cedrik)
Global Moderator
Hero Member
Posts: 1601
Karma: 176
Re: DHCPv4 Server is DHCPACKing addresses which are in use as static lease
«
Reply #1 on:
January 17, 2024, 08:07:03 pm »
This happens if the static lease is inside the DHCP Pool. Make the pool smaller and place static leases outside of it.
https://forum.opnsense.org/index.php?topic=36329.msg177141#msg177141
«
Last Edit: January 17, 2024, 08:09:53 pm by Monviech
»
Logged
Hardware:
DEC740
pbk
Newbie
Posts: 22
Karma: 2
Re: DHCPv4 Server is DHCPACKing addresses which are in use as static lease
«
Reply #2 on:
January 19, 2024, 01:34:56 pm »
Well, that is not how static leases work. Their nature is that these are leases which just never time out and my will guess is that 95% of these reside inside the DHCP range because all the addresses outside are normally left free for devices which cannot retrieve a DHCP address or have to set as static in the device itself.
But… And that's a me-problem, I was under the impression that OPNsense is not using the two years ago EoLed ISC DHCP anymore. That's planned for 24.1 as I found out. Then things are expected to work better as Kea can keep track of static leases.
There's a ton of other weird DHCP things going on which I think are also related to the ISC implementation used. One of them is the DHCP lacking of keeping track of IPs given to the same device if it's part of multiple VLANs (like APs do).
Coming from the Vyatta based EdgeOS platform from Ubiquiti which uses the ISC DHCP as well I have to say that I never encountered these issues in 10+ years (well, it can keep track of devices residing in multiple VLANs, too). So it must be something related to how both pfSense and OPNsense work internally – or it's even older and is something from back in the Monowall days.
Anyhow… Version 24.1 is around the corner so let's wait for it.
«
Last Edit: January 19, 2024, 01:49:21 pm by pbk
»
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
23.7 Legacy Series
»
DHCPv4 Server is DHCPACKing addresses which are in use as static lease