Duplicate IP address allocated to two hosts

Started by Singman, June 07, 2025, 05:33:03 PM

Previous topic - Next topic
Hi,
I have a big problem I could not resolve : one IP address, marked as reserved in the DHCP, is still allocated to another host as dynamic allocation.

The DHCP range is 192.168.0.50 - 192.168.0.200 and even if I delete the dynamic allocation, it's still appear again each time a host is asking for a new IP.

With DHCP, reserved IPs must lie outside of the dynamic allocation range, that is a long-standing rule. I have not found this covered in OpnSense docs, but for the other product, there is even a help page for this:

https://docs.netgate.com/pfsense/en/latest/services/dhcp/mappings-in-pools.html

Per default, the "other product" disallows such reservations per default, while OpnSense does not.

So, either you use an IP from outside the dynamic range for the static allocation or you split up the range to two ranges covering 50-138 and 140-200.
Intel N100, 4* I226-V, 2* 82559, 16 GByte, 500 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

You are right on theory but not in practise. Every DHCP I know (Ubuntu, Windows, ...) allow reservations inside DHCP range.  That mean when a computer request DHCP an IP address, it's always the same one.

June 07, 2025, 09:15:22 PM #3 Last Edit: June 07, 2025, 09:32:42 PM by meyergru
I did not say that it is not allowed, it is just bad practice (at least for ISC DHCP), which is discouraged for the very reasons you can read in the given link - I know of a few more, but you probably want to hear then, either. Matter-of-fact: You are actively experiencing those problems now. Even worse, because your Proxmox PVE host is probably configured statically, you now get a duplicate IP in your network.

And no, it is not prohibited: OpnSense does not protect you from using DHCP the wrong way. pfSense does, but you can waive that protection if so desired.

I also told you how you can avoid such problems in the future. You are free to dismiss my advice and wait for answers that better suit your expectations.

Or, to put it this way: "Mama, it always hurts when I hit my foot with a hammer! Then do not hit your foot with a hammer! But I want to!"
Intel N100, 4* I226-V, 2* 82559, 16 GByte, 500 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

Quote from: Singman on June 07, 2025, 06:36:52 PMYou are right on theory but not in practise. Every DHCP I know (Ubuntu, Windows, ...) allow reservations inside DHCP range.  That mean when a computer request DHCP an IP address, it's always the same one.

ISC DHCP in OPNsense doesn't. Fact, no arguing about that.

I as an operator try to work with the feature set a product offers me. Especially if it's well documented and dead easy.

You might prefer forcing a square peg into a round hole but you do you.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)