DHCP "static" assignments

Simon Hobson dhcp1 at thehobsons.co.uk
Wed Aug 7 19:24:15 UTC 2013


Gregory Sloop wrote:
>There are two basic methods I'm aware of, for handling this:
>[Well, methods that prevent any other host from grabbing the
>"DHCP-static" IP, when the intended host isn't up when an unintended
>one gets to that address in the pool.]
>
>1) omshell/omapi unlimited reservation.
>[Complicated, tl;dr - sounds like much hassle. :) ]

Worth reading !
Not much hassle, and these days I'd suggest it's the better way to do it. The downside being that there isn't a trivially easy way to manage it.

>2) The way I do it now.
>Set aside pools where I set the option
>deny unknown-clients;
>
>Then create host entries for the assignments I want.
>host somehost {
>        hardware ethernet aa:bb:cc:dd:ee:ff;
>        fixed-address 10.0.0.10;
>        }
>
>This works fine, more or less, but can be a pain if I just want to
>"reserve" a single address in the middle of a pool I want unknown
>clients to use. [i.e. It's easy to make mistakes in the syntax of the
>config, among other issues.]
>
>e.g. pool 1-20, reserve 10
>---
>pool .. range 1-9 .. allow unknown-clients
>pool .. range 10 .. deny unknown-clients
>pool .. range 11-20 allow unknown-clients

The pool in the middle isn't needed - just leave it out altogether. The only requirement is that the fixed address sin't in any dynamic range.

As to whether you need to "deny unknown clients", I'm not sure. I vaguely recall seeing postings to the effect that a client will continue using it's dynamic address after you've created a fixed address reservation for it - but I've not got that in my home setup and that works fine. I don't recall having to do it in the past either, back when I used dhcp a bit more "in anger" as it were.


There is another method, but that tends to be used more when you need an assignment based on (for example) opetion 82. That involves creating a class for each assignment, and a pool to go with it with "allow members of ...".


More information about the dhcp-users mailing list