Rebuilding Leases file from log file
Larry Apolonio
isc-dhcp at rh73.com
Tue Nov 27 21:59:46 UTC 2007
Simon Hobson wrote:
> Larry Apolonio wrote:
>
>> 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.
>
>
> Well a while ago Ted suggested something (for cable operators) along
> these lines. Run a DHCP server in the remote locations (ie closer to
> the customers), running OS & apps from flash/whatever (ie diskless)
> and leases in ramdisk. To make the leases persistent, run these in
> failover with a central server back at the NOC (which of course can
> have decent performance disks etc), but configured so that only the
> remote servers normally handle client requests.
>
> If the remote server gets restarted for any reason (such as after a
> power cut), it will pull the leases from it's peer back in the NOC and
> carry on as normal.
>
> Might this be easier to implement - it gives you a continuous live
> backup of the lease states ? Of course, your 'backup' can easily be
> made into a live server by putting it in partner down mode and when
> the primary comes back up the leases will be synced and things will
> revert to normal.
Thanks Simon,
Hows performance in this mode? Can this handle 100 4-way handshakes per
second? I was told that two DHCP servers in peer mode (AKA failover) do
not perform well. This is second hand information, so I have not
confirmed this, thus I have avoided DHCP servers in peer mode and opted
to rsync the lease and dhcpd.conf file and restart it. In my research I
have found that startup times can get really bad, but with two peer DHCP
servers, it may be moot.
Larry
More information about the dhcp-users
mailing list