Implement DHCP Failover in Windows Server 2016

By using Failover on DHCP Server, what we do is share the load between the two servers with load balancing as well as provide fault tolerance. Thus, even if one of the two DHCP servers is not online, then the clients continue to be served by the second server.

The DHCP Failover can be configured with two basic modes.

  • Load Balance Mode, where both DHCP servers are active at the same time and the load is shared between them.
  • Hot Standby Mode, where one DHCP server is active (as primary) and the other is passive (as secondary) so that when the primary is unavailable, secondary is automatically enabled.

These two modes can be applied either at the DHCP Scope level, for each scope separately, or at the Server level for all Scopes universally.

Configure DHCP Failover in Windows Server 2016

In order to implement this scenario, we will assume that we have two DHCP servers, DC01 and DC02, which they are both DCs and DNS servers as well. These extra roles are not required, though.

We assume that the DHCP role has been installed on the two servers and the appropriate Scopes have been configured on one DHCP server.

DHCP Failover – Load Balance Mode

Open the DHCP console, right-click IPv4, and then click Configure Failover.

Implement DHCP Failover in Windows Server 2016

In the window that will appear, you will see the list of available Scopes that you can set for failover. Select all is turned on by default, you can turn it off and select only those you want to configure. Click Next to continue.

Implement DHCP Failover in Windows Server 2016

Click the Add Server button to select the second DHCP server from the list of authorized DHCP servers or simply type the hostname or IP address in the corresponding field and click Next to continue.

Implement DHCP Failover in Windows Server 2016

In the next step, you’ll need to go through some settings.

  • In the Relationship Name field, type a name for the specific “relationship” of the two servers.
  • In the Mode field, select Load Balance.
  • In the Load Balance Settings field, select the load percent of each server to share with each other.
  • In the State Switchover Interval field, you can leave it blank. This setting is used for Hot Standby mode.
  • In the Enable Message Authentication field, you can enable it if desired, and then enter a password in the Shared Secret field. This password is used to authenticate messages sent between the two servers participating in DHCP Failover.

Click Next to continue.

Implement DHCP Failover in Windows Server 2016

Finally, click Finish to complete the Failover set up.

Implement DHCP Failover in Windows Server 2016

Immediately after, the corresponding progress window will appear and as everything went well you will see the Configure failover successful message.

Implement DHCP Failover in Windows Server 2016

DHCP Failover – Hot Standby Mode

The steps to configure Hot Standby mode are the same as those described above, but we’ll only stop at the last step that is a bit different.

  • In the Relationship Name field, type a name for the specific “relationship” of the two servers.
  • In the Mode field, select Hot Standby.
  • In the Hot Standby Settings field, select the percentage of addresses that the standby server will reserve.
  • In the State Switchover Interval field, select the time that will be required until the status of the DHCP Server change from passive to active.
  • In the Enable Message Authentication field, you can enable it if desired, and then enter a password in the Shared Secret field. This code is used to authenticate messages sent between the two servers participating in DHCP Failover.

Click Next to continue.

Implement DHCP Failover in Windows Server 2016

Immediately after, the corresponding progress window will appear and as everything went well you will see the Configure failover successful message.

Implement DHCP Failover in Windows Server 2016

View and edit DHCP Failover settings

So, after you have set up your DHCP Failover on your server, you may need to view again how it was configured and possibly edit some of its settings. This is done through the DHCP Properties window.

Right-click on IPv4 and then click Properties. In the window that opens, go to the Failover tab. Here, you can see the status of failover settings, edit and delete them.

Implement DHCP Failover in Windows Server 2016

Correspondingly, through the settings window of each DHCP Scope, you can view the failover settings for each Scope separately.

Implement DHCP Failover in Windows Server 2016

Force Scope and Relationship replication

If you’ve made changes to a server and want to force the replication from one partner server to another, then this is how it’s done.

To replicate Scope settings, right-click a Scope, and then click Replicate Scope.

Implement DHCP Failover in Windows Server 2016

Correspondingly, to replicate settings of all Scopes, right-click on IPv4 and then click Replicate Failover Scopes.

Implement DHCP Failover in Windows Server 2016

Finally, to replicate settings of all Scopes in a particular relationship, right-click on a Scope and then click Replicate Relationship.

In any case, the corresponding confirmation message will be displayed.

Implement DHCP Failover in Windows Server 2016

Remove (deconfigure) DHCP Failover

Removing DHCP Failover settings between two partner servers is very easy and fast, again at both server and Scope level.

To remove a DHCP Failover Scope, right-click on the Scope and then Deconfigure Failover.

Implement DHCP Failover in Windows Server 2016

You will need to confirm your action and then the corresponding message will be displayed.

Implement DHCP Failover in Windows Server 2016

When removing the DHCP Failover, Scopes and Relationships will be removed from the partner server.

DHCP Failover via PowerShell

Of course, all of the above actions can be done through PowerShell. However, due to the fact that DHCP Failover settings do not change often, it might have been quicker and easier to do it using the DHCP console instead of PowerShell’s advanced parameters. So I will not focus more on this point, apart from mentioning the basic cmdlets.

  • Add-DhcpServerv4Failover
  • Add-DhcpServerv4FailoverScope
  • Get-DhcpServerv4Failover
  • Remove-DhcpServerv4Failover
  • Remove-DhcpServerv4FailoverScope
  • Set-DhcpServerv4Failover
  • Invoke-DhcpServerv4FailoverReplication

If you are interested, you can search for more information about the parameters you will need through Microsoft documentation.

About Dimitris Tonias 143 Articles
My name is Dimitris Tonias, IT Pro, G(r)eek, focused on Server, Virtualization, and Cloud technologies.

4 Comments on Implement DHCP Failover in Windows Server 2016

  1. This perfectly explains everything. Great job! I was confused on why the scopes didn’t replicate over.

  2. is it possible to replicate the scopes automatically when a change is made to a one dhcp server? in the dhcp load balancing mode, are the scopes automatically replicated?
    Thanks!!

  3. Hi,

    Thx for this topic.
    On 2012R2 server, we have a limiation of 31 failover relations.
    Is it the case on 2016 ?
    Thx

    • To be honest I’m not quite sure about this. I can’t find any official reference from Microsoft that this limitation has changed in WS2016, so I assume that the limit is the same one with 2012R2 server.

Leave a Reply

Your email address will not be published.


*