How to add static dhcp

  • Hi
    I am using 2.0 snapshot build 07-Dec
    My Lan config as DHCP server from to
    I want to plug some device which can use mac address for static address,
    Unfortunately it is not allowed any address in between 100 to 245…

    Any idea?
    I remember 1.2.3 will worked

  • Reduce your range otherwise not possible.
    If it was allowed in 1.2.3 does not mean is a good thing.

  • This is a bit annoying because it doesn't work similarly to other DHCP servers I've used (primarily Windows Server) where adding a static reservation blocks any other client than the specified one from receiving that IP, regardless of whether it's in or out of an exclusion range (and thus is a bit more flexible…however Windows is also more flexible in allowing an arbitrary number of exlusion ranges for each scope etc.). However, at least it's documented and seems to work consistently :-) It sounds like it's an issue with the functionality in the underlying DHCP server package used and not in pfSense directly. Other than in IP planning it doesn't really affect what you can accomplish functionally for the most part.

  • @David:

    This is a bit annoying because it doesn't work similarly to other DHCP servers I've used (primarily Windows Server)

    That's just how ISC dhcpd functions, which is the de facto standard *nix DHCP server implementation, as well as the reference implementation of a DHCP server.

    Knowing the history of other *nix services and somewhat unusual behaviors, I suspect there's some ancient reason for this behavior, I'm not sure what it is though.

  • That's for this history/info Chris. I'm not saying it's wrong, just different than what I'm used to. The only time it is really much of an issue is when transitioning from using Windows DHCP Server to something else like pfSense, where a large number of static reservations are in place, since it's impossible to configure things the same way in some cases. However, I think that in all of the situations I've run into where that would be the case, I've left (with no regrets) the Windows DHCP in place and pfSense of course runs fine without having to do DHCP as well :-)

    Good to learn stuff though, I'll definitely be more prepared for future pfSense configs as well as dealing with other *nix DHCP servers in the future when I run into them. Now I'm kind of curious what the original technical reason was for the design choice, but I might research that later (could be in the DHCP RFCs I'm guessing). My time is probably better spent going to bed right now though, since I've spent way too long tonight reading through all of the blog posts on Bufferbloat (another very interesting bit of knowledge) referenced in another recent post here :-) It certainly appears to be more worthy of attention (in general) than updating how DHCP works in any case.

  • It might be able to be made to split up the DHCP address pool into multiple ranges automatically to go around the static mappings, though I'm not sure how well that would work.  Of course, that would be for a later version, not 2.0.

  • Rebel Alliance Developer Netgate

    That could work in theory, but would be really ugly.

    You can have multiple range statements that would go around them, it wouldn't be hard to code that up, but it's much better practice to not mix your DHCP and static hosts in the same range.

    Multiple ranges are on my to-do list for 2.1, I think there's an open feature request ticket already.

Log in to reply