[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Multiple dhcp servers.



On Sat, Jan 26, 2002 at 12:20:32PM +1300, Dave Watkins wrote:
> As far as I know this isn't possible for a few reasons. The lease table for 
> IP's already allocated is stored in a file on the system. To have failover 
> your second machine would have to have a copy of this file locally. 
> Secondly as you mentioned both servers will respond and whichever machine 
> reply get to the client first is the one it will accept. If you could get 
> the dhcpd.lease filesynced in realtime it should be possible.. but it would 
> be messy at best. I haven't looked into this for a while and there maybe a 
> better way to do it now.
> 
> The other option is have the second machine as a complete failover and use 
> a heartbeat much like the current mailserver thread is going
> 

ISC DHCPD (can't speak for others) is smart enough to actually ping the IP
before it's assigned. If it gets a response, meaning that the IP is in use,
it makes note of it and hunts for another address to give out.

It's not terribly graceful, but it works well enough let you easily migrate
servers. If you were very diligent about keeping the configuration
identical on both machines, you COULD run a sort of brute-force failover.

Alternatively, you could have server A providing leases on 192.168.1.1-100
and server B using 192.168.1.100-200. This works but wastes IP space and
forces clients to needlessly change their addresses when a server goes down.
When I tried this on a small scale, each server handled approximately 50% of
the requests.

But most people just have a really high max-lease-time during normal
operations, and bring it down to like 300 when changes are expected to be
made.

-- 
Jacob Elder
http://www.lucidpark.net/



Reply to: