Knowledge Base ISC Main Website Ask a Question/Contact ISC
How do I resynchronize a failover pair?
Author: ISC Support Reference Number: AA-00609 Views: 4508 Created: 2012-01-26 09:00 Last Updated: 2015-10-15 14:10 0 Rating/ Voters

There are various reasons for wanting to resynchronize a failover pair of DHCP servers.  These include:

  • Hardware failure - one server is offline for a long time while it is replaced
  • Configuration error (changes or migrations) causing issues such as both servers believing that they are the primary for one or more address ranges
  • Migration

If the requirement is (for whatever reason) to manually trigger a re-synchronization, then assuming that the primary server is correct, on the secondary (or vice versa):

  1. Stop dhcpd
  2. Delete the leases file
  3. Create an empty leases file, such as the example in the dhcpd.leases(5) manual: # touch /var/state/dhcp/dhcpd.leases
  4. If the peer had been placed in partner-down state using OMAPI or through lease file editing, return the peer to normal state.
  5. Restart dhcpd.
This will cause the secondary to refresh the leases file entirely from the primary.  (This is sometimes called "faulting the database".)

This will not resolve any duplicate IP addresses

Incorrect configurations may cause two servers to assign the same lease to different clients.  Correcting the server configurations will not affect the clients who are already running with the same addresses.  If you have two clients with the same IP address, you need to find the one that was served by the secondary and cause it to request a new lease.  If you don't know which of the two clients obtained its lease from which server, then both will need to be made to request new addresses.

Use care if part of the lease database is not shared

You might not want to do this if the re-synchronizing server is serving one or more pools which is/are not shared with the peer.  Our best recommendation in such a case is to edit the leases file manually, or for a large server, use awk, perl or other scripting tool of choice to remove only the leases from the shared pool[s].




© 2001-2016 Internet Systems Consortium

Please help us to improve the content of our knowledge base by letting us know below how we can improve this article.

If you have a technical question or problem on which you'd like help, please don't submit it here as article feedback.

For assistance with problems and questions for which you have not been able to find an answer in our Knowledge Base, we recommend searching our community mailing list archives and/or posting your question there (you will need to register there first for your posts to be accepted). The bind-users and the dhcp-users lists particularly have a long-standing and active membership.

ISC relies on the financial support of the community to fund the development of its open source software products. If you would like to support future product evolution and maintenance as well having peace of mind knowing that our team of experts are poised to provide you with individual technical assistance whenever you call upon them, then please consider our Professional Subscription Support services - details can be found on our main website.

Feedback
  • There is no feedback for this article
Info Submit Feedback on this Article
Nickname: Your Email: Subject: Comment:
Enter the code below:
Quick Jump Menu