OPNsense Forum

English Forums => General Discussion => Topic started by: hanse on August 16, 2023, 12:30:23 PM

Title: SOLVED: DHCP keeps dishing IPs already used in static mappings
Post by: hanse on August 16, 2023, 12:30:23 PM
Hi all

I have a persistent problem that I just cannot seem to get rid of. I have added a bunch of static mappings for servers (Like Docker Swarm nodes) that I want to have the same IPs all the time. Problem is, whenever I create a new VM or container on Proxmox, it will be issued with an address that is already used in a static mapping.

See attachment.

Any idea how I can get rid of this problem? What am I doing wrong?

TIA.
Title: Re: DHCP keeps dishing IPs already used in static mappings
Post by: Patrick M. Hausen on August 16, 2023, 12:31:34 PM
Static mappings and your dynamic range must not overlap.
Title: Re: DHCP keeps dishing IPs already used in static mappings
Post by: hanse on August 16, 2023, 12:36:01 PM
Sorry but I don't understand why not? Adding a static lease is supposed to reserve an IP in the pool for exactly this case? Or should I create a smaller pool, and then add static mappings from higher up in the range for example?
Title: Re: DHCP keeps dishing IPs already used in static mappings
Post by: franco on August 16, 2023, 12:41:56 PM
Simple: because isc-dhcp will hand out dynamic leases and doesn't care that it also has a static lease.


Cheers,
Franco
Title: Re: DHCP keeps dishing IPs already used in static mappings
Post by: hanse on August 16, 2023, 12:44:04 PM
OK thank you for the clarification. TIL.