Editing dhcpd.conf without corrupting leases

John Tabasz (jtabasz) jtabasz at cisco.com
Tue Apr 14 17:48:54 UTC 2009


This pretty closely describes the solution I came up with to maintain a
large dhcpd.conf file with statically assigned addresses exclusively. 
I use the db to add any new servers or change any names or addresses,
then if a change is made I create a file that contains all of the
information for all of the servers on the subnet on which the change
occurred. Not just the changes. If a particular site houses more than
one subnet, all subnets are included in the new flat file. Then through
a couple of perl scripts a new dhcpd.conf file is created and tested
before being scp'd to the appropriate dhcp server. 
I'm not sure exactly how to modify this to be a db only solution, but
would be open to suggestions.

John 

-----Original Message-----
From: dhcp-users-bounces at lists.isc.org
[mailto:dhcp-users-bounces at lists.isc.org] On Behalf Of
A.L.M.Buxey at lboro.ac.uk
Sent: Tuesday, April 14, 2009 1:18 AM
To: Users of ISC DHCP
Subject: Re: Editing dhcpd.conf without corrupting leases

hi,

when you get to this sort of large numbers of static hosts and
modification numbers then the best way is to move all of it to a DB back
end. generate a dhcpd.conf.new from the DB entries, then do a sanity
check (hopefully the code producing the config file from the DB will
stop weird and broken entries anyway!), then diff the new file versus
the old file - and if its changed, move it across (after backing up the
old version) and restart the DHCPD process.

alternatively, migrate to a total DB solution and remove the whole
flat-file thing.

alan

_______________________________________________
dhcp-users mailing list
dhcp-users at lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users



More information about the dhcp-users mailing list