Note: This article was originally published in 2013. Some steps, commands, or software versions may have changed. Check the current Windows Servers documentation for the latest information.

In this step-by-step guide, you’ll learn delete a dhcp failover relationship when the partner server is unreachable. Windows Server is a group of operating systems designed by Microsoft to handle enterprise-level management, data storage, applications, and communications.

Prerequisites

Before you begin, make sure you have:

  • Windows Server installed
  • Administrator access
  • Remote Desktop or direct console access

How to: Delete a DHCP Failover relationship when the partner server is unreachable

One of the latest issues I’ve come across is removing a DHCP Failover relationship. In a previous article I referenced a new (http://www.windowsserver.com “Windows Server”) feature ((http://technology.tpu.mx/microsoft/servers/windows-servers/error-0x800f0922-adding-dhcp-role-windows-server/ “Error 0x800f0922 while adding DHCP role on Windows Server”)) which is DHCP Failover. This is a pretty cool feature as it allows you one of two things:

  1. DHCP (http://en.wikipedia.org/wiki/Load_balancing_%28computing%29 “Load balancing (computing)”): You can have your DHCP requests handled by 2 servers instead of 1
  2. DHCP hot spare: If your (http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol “Dynamic Host Configuration Protocol”) goes down, a second DHCP server comes online and handles the requests

Obviously this is a pretty cool feature. The main issue with DHCP servers is that because they don’t share a common database, a lease assigned by one server can have a conflicting (http://en.wikipedia.org/wiki/IP_address “IP address”) (because the other DHCP server already assigned it), etc.

So when does this feature become an issue? When both servers lose communication. This is something that should rarely happen and probably it is just a temporary problem, but there are a few scenarios when reaching the partner DHCP server might be practically a permanent position. In that case if you wanted to break the relationship you won’t be able to unless the partner is reachable to delete the (http://en.wikipedia.org/wiki/Failover “Failover”) scope on that server. This could happen if you take the server to another physical location which is not connected via the network/dhcp or makes it unreachable. In my case, I changed the domain name of our Active Directory which caused a Server name change (just the dns suffix). So, even though I maintained a reference to it in (http://en.wikipedia.org/wiki/Domain_Name_System “Domain Name System”) with the old suffix and you could reach it via ping, I was not able to remove this relationship. Obviously, the big issue more than removing the relationship is that because both servers are not communicating you may lose the ability to prevent IP lease conflicts.

Unfortunately the workaround is to perform step by step what the wizard would had done and force said actions:

  1. Pick the server you want to keep. Look at your DHCP leases and determine which might be the most complete.

  2. Stop the partner DHCP server so only one server is responding to DHCP requests

  3. Try to assign clients from the partner DHCP server back to the server you want to keep. Renew leases so to prevent potential conflicts.

  4. You are going to force the removal of the DHCP failover relationship. Because there is no communication the partner server won’t transmit the latest changes and the scope won’t be removed from it. Execute the following command in order to remove the relationship: Remove-DhcpServerv4Failover -ComputerName dhcpserver.bauzas.com -Name SFO-SIN-Failover -Force

  5. You will get a warning that says: “Failed to delete the failover relationship <Name of the relationship, i.e. SFO-SIN-Failover> on the partner server <Name of partner server, i.e. dhcpserver2.bauzas.com>”. As I mentioned this is the expected behavior as you cannot communicate with the partner server.

  6. Manually delete the scope from the partner server to ensure no conflicts arise if it accidentally becomes active.

And that should do the trick. If you wanted you could form again the relationship in case the issue was a problem with the server names or you could form a new relationship with a new server. Either way just make sure you don’t have 2 DHCP servers assigned to the same IP scope that are not in a failover relationship.

(http://img.zemanta.com/zemified_e.png?x-id=bc26498e-a55b-4ef4-bdc3-efbdf25f6392)](http://www.zemanta.com/?px “Enhanced by Zemanta”)

Summary

You’ve successfully learned delete a dhcp failover relationship when the partner server is unreachable. If you run into any issues, double-check the prerequisites and ensure your Windows Servers environment is properly configured.