DHCP Reservations (Static Mappings) - Is there s simple tutorial?

Started by mrredpants, October 07, 2023, 08:43:22 PM

Previous topic - Next topic
I'm not posting this without having spent time researching and reading - but, alas, that has only led to more confusion for me. I am going to do my best to use the proper names and definitions as they relate to opnsense.

I have a new, very basic network setup at home running Opnsense - OPNsense 23.7.5-amd64  , FreeBSD 13.2-RELEASE-p3, OpenSSL 1.1.1w 11 Sep 2023.

LAN 10.50.250.0 / 24; available DHCP range 10.50.250.1-254; Range 10.50.250.10-254
I created static mappings for several devices - examples, 10.50.250.50, 10.50.250.54, etc.
As time passed, DHCP service was not respecting the static mappings as I'd expect and was handing out "reserved" IPs and creating duplicates.

I did some reading and got mixed messages. Some said the static mappings should be outside the range (which didn't make sense to me, I couldn't figure how DHCP would give out an address not within the range.) Some said this was a bug. Others mentioned the need for a separate pool.

So, I changed the primary range to 10.50.250.75-254, created a pool set from 10.50.250.10-74. The static mappings were in this additional pool's range.  When one of the devices with static mappings requested an address, DHCP logs show it saying that it wasn't available.

I've attached some screenshots of my settings as well as the logs.

My needs are basic. I want a dhcp range and have certain devices IP addresses reserved. Coming from Windows DHCP, this is very simple to do. I don't know if I'm confused with terminology or if it's something else.

Thanks in advance

The static mappings should be outside the normal DHCP range. You dont need an additional DHCP pool for them.

e.g.
Pool Range:
from 192.168.2.2 to 192.168.2.99

Static Mappings:
Host 1: 192.168.2.100
Host 2: 192.168.2.101
etc...

Think of static mappings as additional mini pools that are created per host basis.
Hardware:
DEC740