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

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 Windows Server feature (Error while adding a second DHCP Server) which is DHCP Failover. This is a pretty cool feature as it allows you one of two things:

  1. DHCP Load Balancing: You can have your DHCP requests handled by 2 servers instead of 1
  2. DHCP hot spare: If your DHCP server 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 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 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 DNS 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 -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.>”. 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.

Enhanced by Zemanta

You may also like...

3 Responses

  1. As says:


    After Stopping the partner Server i just force but its still running ?


  2. Pato says:

    Hola! gracias por la info, me sirvió el comando sacandole el nombre del server. En mi caso, fue una migración de server de un dominio a otro sin antes haber desarmado el failover. Por lo cual, luego no se podia eliminar. Por lo cual si alguien tiene que migrar de dominio, deberia desarmar el failover antes de la migración.

    Hi! nice info!. It worked for me, without the name of server syntax. In my case, it was a server domain migration where I migrate the dhcp server without deletting failover config first. I think if someone need to do a domain server migration, It would be good deleting failover before migration.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.