Migrating to Failover
David W. Hankins
dhankins at isc.org
Tue Sep 15 17:22:49 UTC 2009
On Tue, Sep 15, 2009 at 09:49:51AM -0400, Norman Elton wrote:
> I've got a single DHCP server serving roughly a dozen subnets. I want
> to move this to a new pair of DHCP servers running failover. I'd like
> to do this in a controlled manner, one subnet at a time. It's easy to
> change the helper-address on a particular subnet, but I somehow need
> to migrate the leases to the new pair.
it would mean surgery to dhcpd.leases every time, while the server is
offline and not answering queries. so you are going to have an
extended outage either way.
> Can I just take the relevant leases from the existing server and
> append them to the end of each of the new server's lease file?
> Obviously this would need to be done with the server shutdown. I can
> tolerate a few minutes outage if necessary. When the servers fire back
> up, will it recognize the new lease, even though it doesn't have all
> the attributes of a typical failover lease? What happens to the
> existing ("free" or "backup") lease already in the file?
just use your current server's dhcpd.leases file on your new primary
server. start the secondary with an empty dhcpd.leases file and it
will load a copy from the primary, with any changes the primary has
1) you could route your old server's /32 to the primary while you
adjust helper-addresses. the worst that will happen is that some
clients will have to wait for the load-balance-max-secs to expire
to get leases, which you can set low (3 seconds, let's say).
2) start your old single server as a failover primary, using its same
old lease database. start your new secondary server listing your
old dhcp server as its peer. the secondary will load the old
server's lease database, and will be kept up-to-date on changes as
the old server makes them.
wait out your MCLT, or at least see that both servers are in the
change your helper-addresess while in this configuration to point
to the new primary and secondary. note the new primary must not
be answering (no dhcpd process). slowly, the secondary will start
to take new clients (existing clients will renew by unicast to the
old dhcp server).
when you are done, kill the old dhcp server (very important as it
will get renewals) and restart the new failover pair, the primary
with an empty lease database, and the secondary with only a config
change so it points to the new primary as its peer now. the primary
will recover the lease database from its secondary. your clients
will not be able to renew their leases with the old dhcp server, but
before their leases expire, they will 'rebind', and broadcast their
requests via your helper-address relays, which will get them back on
either your new primary or secondary.
when MCLT has again expired, and they've gone normal, you'll be
David W. Hankins "If you don't do it right the first time,
Software Engineer you'll just have to do it again."
Internet Systems Consortium, Inc. -- Jack T. Hankins
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the dhcp-users