In this tutorial, we’re going to show you how to configure DHCP failover on Windows Server 2022.
In a recent article, What is DHCP and Why Is It Important?, we tried to concisely explain why the Dynamic Host Configuration Protocol (DHCP) is so important. Essentially, this is a critical service for almost any business network because it provides a centralised way of distributing network configurations to connected devices. Some of these are really important settings, such as:
- IP addresses for individual machines.
- The subnet mask, which identifies the network that the machine is connected to.
- The Gateway, which is the address that machines use to communicate with devices outside the network.
- DNS servers, which translate names into IP addresses and vice versa.
- Domain names, which are used instead of IP addresses.
- The WINS address, which is the address of the WINS server that machines use to resolve NetBIOS names.
And there are many, many more parameters besides.
The problem with the DHCP service is that the entire network depends on it. If the DHCP server goes down, pretty much any business will grind to a complete halt.
This is why it’s important to have redundancy. This is achieved by deploying an additional server that can take over if the main one fails.
Two forms of redundancy are commonly used:
- Load balance: This is where requests are shared between the two servers, normally evenly, but this can be changed.
- Hot standby: This is where the second server is kept running but doesn’t respond to requests unless the main server fails.
In this tutorial, we’re going to focus on load balancing, but the procedure for ‘Hot Standby’ is very similar. The steps detailed here are written for Windows Server 2022, but the process is equally valid for Windows Server 2019 or 2016.
For this tutorial, we’ll assume that you have already configured your main DHCP server. If that’s not the case, have a look at these tutorials first:
And after that rather lengthy introduction… let’s get stuck in!
How to Configure DHCP Failover on Windows Server 2022
Before you get started…
To successfully complete this tutorial, you will need the following:
- To be registered with an organisation on the Jotelulu platform and to have logged in.
- A Servers subscription on the platform.
Part 1 – Deploying a Second Server
As we said in the introduction, we’re going to assume that you’ve already deployed your main server. If you haven’t, you should do that before proceeding with this tutorial.
The second thing to do is to check that the two servers can see each other. A simple ping will be enough for this.
NOTE: For security reasons, we recommend that you only open the ports required for DHCP communications and leave all the others closed. Unfortunately, many people just open all ports to save time.
Configuring the DHCP service on the second server will be very similar to the process for your main DHCP server. The difference will be how you configure it once it has been deployed.
First, you need to install the DHCP server role on your second server. To do this, open Server Manager, click on the Manage menu and then click on Add Roles and Features (1).
At this point, you will see the Add Roles and Features Wizard. Once you’ve read the recommendations on the screen, click on Next (2).
Next, you need to select an Installation type. Select the first option, Role-based or Feature-based installation (3) and click on Next (4).
You’ll now be asked to choose a destination server. Select the first option, “Select a server from the server pool” (5) and then select the server on which you want to add the role (6). Once you’ve done this, click on Next (7).
On the next screen, scroll down the list of roles until you find the DHCP Server role and tick the checkbox next to it (8). A new window will appear asking whether you want to “Add features that are required for DHCP server”.
Leave the checkbox marked next to “Include management tools (if applicable) (9) and click on Add Features (10). You’ll then be taken back to the previous window where you should click on Next (11).
Leave the next window as it is and click on Next (12).
The next screen will show additional information that we recommend that you read (13). Once you’ve done this, click on Next (14).
At this point, you’ll be asked to confirm your installation choices. Personally, I prefer to leave the checkbox unmarked next to “Restart the destination server automatically if required” (15). Check that you’re happy with your installation choices (16) and click on Install (17).
The system will now begin installing the role on the server and display a progress bar (18). You can either wait for the process to finish or click on Close (19).
If you choose the click on Close before the role has finished installing, you can still check its progress by clicking on the notifications flag (20).
Normally, when setting up a DHCP server, you’d click on Complete DHCP Configuration” (21) at this point. However, since we’re configuring a second server for load balancing, the process will be slightly different.
Part 2 – Configuring DHCP Failover
Now that you’ve deployed a second DHCP server, the next step is to configure DHCP failover. To do this, click on the notifications flag (22) and click on “Complete DHCP configuration” (23).
At this point, you will see the DHCP Post-Install configuration wizard. Read the information on the screen carefully and click on Next (24).
Next, you need to choose an authorisation method. Select “Use alternate credentials” (25) and click on Specify… (26).
Then, enter a user name and password (27) and click on OK (28).
Check that the UserName appears correctly in the field and click on Commit (29) to apply the changes.
If everything has been done correctly, you should see a progress window with the word “Done” next to each task (if there has been a problem, you will see the word “Failed”). Once this is complete, click on Close (30).
Now that you have set the authorisation method for your second DHCP server, it’s time to return to the first server and open the DHCP console.
On the left-hand side of the screen, you should right-click on the Scope you want to share and select “Configure Failover…” (31).
You will be presented with the Configure Failover screen. Click on Next (32).
On the next screen, you need to specify the partner server to use for failover. Click on Add Server (33).
Then, select “This authorized DHCP server”, select the server (34) and click on OK (35).
Check that the server appears in the Partner Server field (36) and click on Next (37).
On the next screen, there are quite a few points to cover. So, to save you a screenshot covered with arrows and numbers, here’s a list of settings that you need to review (38):
- Relationship Name: This should be the name of the failover server.
- Maximum Client Lead Time: Leave the default settings.
- Mode: (Explained at the beginning of this tutorial).
- Load balance: Shares requests with the main server, normally evenly.
- Hot standby: Keeps the server running but doesn’t respond to requests unless the main server fails.
- Load Balance Percentage: The percentage of the load that each server takes on, which is normally 50% for each.
- State Switchover Interval: Leave unchecked.
- Enable Message Authentication: Tick this option.
- Shared Secret: Password used for communications.
Once you have reviewed these settings, click on Next (39).
At this point, you have another chance to check your configuration choices. Once you’re happy that they’re correct, click on Finish (40).
You will then see a window displaying the failover configuration progress. If everything has gone smoothly, you should see the word “Successful” next to each item (41). Once the process is complete, click on Close (42).
Now, if you return to your second server, you should see that the DHCP service is running as part of the cluster (43).
NOTE: If you finish the configuration process and don’t see any changes in the DHCP console on the second server, it’s possible that it just needs to be refreshed. All you need to do is close the console and re-open it.
Summary and Further Reading
In this tutorial, you’ve learnt how to configure DHCP failover on Windows 2022, which allows you to deploy the DHCP server role on two servers and maintain high availability. It’s a standard way of making sure that your network is always operational even in the event of a server failure. This tutorial has been written for Windows Server 2022, but it’s also valid for versions 2019 and 2016.
If you’ve already configured your DHCP service, you might be interested in the following articles as well:
We hope that you’ve found this tutorial useful, but if you have any problems, please don’t hesitate to contact us so we can help you.
Thanks for choosing Jotelulu!