Personal tools

Why can't I have static mappings inside my DHCP range?

From PFSenseDocs

Jump to: navigation, search

While ISC dhcpd will allow you to define a static mapping inside your DHCP range/pool, it can result in unexpected behavior.

ISC dhcpd only checks via ping to ensure that an IP is not actively in use when making assignments. Making a static mapping does not "reserve" that IP out of the pool. The static mapping in this case merely represents a preference for an IP, and others are not prevented from taking the IP if it is not in use.

An example: If your DHCP pool is from 192.168.0.10 to 192.168.0.250, and you define a static mapping for 192.168.0.25. If the PC that normally has 192.168.0.25 is ever offline, another device could be assigned 192.168.0.25. When the other machine powers back up, it will not be able to get 192.168.0.25 because it is currently in use.

As such, it is best to only make assignments outside the range/pool, and the pfSense WebGUI enforces this practice.

If you absolutely must make assignments inside the pool, and you are aware of the risks involved and want to do so anyway, you may remove the input validation check from the PHP file that drives the DHCP editor page. The details of this unsupported change are left out as an exercise for the reader.