IPAddress Reservation (Best Practice)

Simon Hobson dhcp1 at thehobsons.co.uk
Mon Aug 11 12:57:03 UTC 2008


Luis Fernando Lacayo wrote:

>I have a quick question,  I have a bunch of subnets and I have DHCP 
>Lease reservations for almost every network.

First off, I assume you mean "fixed address assignments" - lease 
reservations are a bit of Windows terminology, different method of 
working and plenty of scope for confusion !

>   my question is about how to define these reservations.  currently 
>I have each reservation under its own subnet.  I have seen some 
>configuration files that just bundles them at the end of the file. 
>I imagine that this works.

They MUST NOT be within a subnet declaration. With a few exceptions 
for some rather unusual requirements, you REALLY do not want them in 
your subnet declarations. Host statements are global in scope (and so 
are still 'valid' when the client is not in that subnet - BUT, 
clients matching a host statement will inherit some options from the 
subnet where the host declaration is made.

In case you haven't worked that out, you can have a client getting a 
dynamic IP address in one subnet, while inheriting the (incorrect) 
router address from the subnet where it's host statement is declared. 
I think anyone can imagine the confusion that could cause !

>I am working on a small interface to to manage these because they 
>are getting out of control, with staff members moving floors and 
>printers being removed or relocated... 
>
>How are you defining your reservations? and better yet how are you 
>managing them?

Many people store the information in a database (it can be anything 
you are comfortable with), and then have a routine that will extract 
the data and build a config file. You only need to build parts of a 
file - for example you can just build a file with host declarations 
and use the 'include" statement to include it in the main config file.


More information about the dhcp-users mailing list