Rebuilding Leases file from log file

Frank Bulk frnkblk at iname.com
Tue Nov 27 21:15:09 UTC 2007


Why not just sync your dhcpd.leases file more often?

Frank

-----Original Message-----
From: dhcp-users-bounce at isc.org [mailto:dhcp-users-bounce at isc.org] On Behalf
Of Larry Apolonio
Sent: Tuesday, November 27, 2007 2:58 PM
To: dhcp-users at isc.org
Subject: Rebuilding Leases file from log file

I know its not perfect but is it possible to send dhcp logs to a remote
syslog server and rebuild the dhcp leases file based on mac, IP address
was assigned, and time. I'd use the lease time in dhcpd.conf to
configure the amount of time.  Say the lease time was 1 day then

Nov  9 12:24:32 dhcp-server dhcpd: DHCPACK on 10.10.126.164 to
00:00:00:00:22:95 via 192.168.0.4

would become

lease 10.10.126.164 {
  starts 2 2007/11/09 12:24:32;
  ends 4 2007/11/11 12:24:32;
  tstp 4 2007/11/11 12:24:32;
  binding state free;
  hardware ethernet 00:00:00:00:22:95;
}

What bad mojo would I encounter?

Basically would I be able to start up my spare server as the DHCP server
with the dhcpd.conf file using a leases file generated from the syslog
server?

Now I can put the leases file in tmpfs or /dev/ram, syslog would be off
the DHCP server, and we would be using something more current than an
hourly rsync of the leases file.

Larry Apolonio





More information about the dhcp-users mailing list