DHCP Load Balancing / Failover In Windows Server 2012 R2
CHUONG K. NGUYEN – BSc., MCSEx2, MCSAx2, MCP, MCTS, MCITP, CCNA
In this lab I will guide you through configuring a simple DHCP load balancing scenario using Microsoft Windows Server products.
1/ Physical Topology
There are two DHCP Servers running Windows server 2012 R2.
DHCP01: 192.168.10.10 (Server 2012 R2)
DHCP02: 192.168.10.20 (Server 2012 R2)
DHCPClient: 192.168.10.x (Windows 10 Professional)
The DHCPCient will receive TCP/IP Information from the above DHCP servers. Both DHCP Servers will split workload evenly in a 50%-50% manner. When one server is down, the other server will still be functional to distribute IP addresses to client requests.
2/ Detailed Implementation
On DHCP01, type ncpa.cpl and program TCP/IPv4 with the following IP address:
On DHCP02, type ncpa.cpl, program TCP/IPv4 with the following IP address:
We will now add the DHCP role on DHCP01. On DHCP01, use Server Manager, click Add Roles and Features.
Choose Role-based or Feature-based installation and click Next.
Highlight the server name and click Next.
Choose DHCP Server
Click Add Features
Leave default features (do not select anything) and click Next.
Checkmark on Restart the destination server automatically if required and click Install.
When installation completes, we need to configure the DHCP server. First, click Close to close the installation Wizard.
In Server Manager, click the Yellow flag, click Complete DHCP configuration.
Click Commit to allow creation of the security groups needed for DHCP Service.
Now restart the DHCP Server Service. Click Start, type services.msc. Click on Services to open the Services Management Console.
Highlight DHCP Server and click Restart.
Now close the Services console, click Start, type dhcpmgmt.msc and click to open DHCP Management.
3/ Add a DHCP Scope
Right-click IPv4 and click New Scope…
Name the scope anything such as MyScope and click Next.
Type Start and End IP addresses for the scope. Clients will receive IP addresses within this IP range. For the subnet mask, use a 24-bit mask, or anything that is suitable to your environment. Click Next.
Leave Exclusion alone and click Next. Sometimes you have a static IP address within the scope range given to a device and you do not want that IP address to be given to another device by the DHCP, you need to add it in the Exclusion list. In this lab, we do not have an exclusion.
Leave the Lease Duration as default (8 days) and click Next.
Choose to configure the options now. Click Next.
Type 192.168.10.1 as the router IP address, click Add then click Next. This is the default gateway for any clients receiving IP address from the DHCP server.
Type the parent domain and click Next.
Leave WINS alone (enter nothing) and click Next.
Activate the scope now. Click Next.
Now we have the first DHCP server configured to give out IP address.
4/ Testing on DHCPClient
Turn on the DHCPClient and the client should receive an IP address from this server. On the DHCPClient, type ipconfig /all at the command prompt. You will see that DHCP01 is the server that gives out an IP address to DHCPClient.
5/ Install DHCP Server on the second node
Now we will install DHCP Server on DHCP02. Follow the exact steps as in DHCP01. When the installation completes, we need to configure the DHCP Server. Click the yellow flag and click Complete DHCP Configuration.
Click Commit to add the mentioned security groups.
Click Start, Type services.msc to launch the Services console and restart the DHCP Server service.
Click Start, type dhcpmgmt.msc to open the DHCP Server Console.
You can see that we do not have a scope yet.
6/ DHCP Configuration for the second node
Let’s add DHCP01 into the DHCP02 console so we can manage both DHCP servers in one single place. Right-click DHCP and choose Add servers…
Enter the IP address of DHCP01 and click OK.
Now we are on DHCP02 but we can see both DHCP servers in one single management interface.
Under DHCP01, click IPv4, right-click on the Scope and click Configure Failover…
Type the IP address of DHCP02 and click Next.
Enter a shared secret (like a password) of your choice and click Next.
Under DHCP02, right-click on IPv4 and click Refresh.
As you can see, the Scope is replicated to DHCP02 now.
7/ Testing Failover
Let’s deactivate the Scope in DHCP01.
Click Yes to confirm the deactivation.
The scope is now deactivated as shown with a red down arrow.
8/ Testing on client computer
On DHCPClient, type ipconfig /all, the IP address is still listed. This is because the lease has not expired yet.
Now we want to release this IP address. Type ipconfig /release
Now renew the lease. Type ipconfig /renew then show the new IP address using the command ipconfig /all. As you can see, DHCP02 is the server that provides IP address to the client when DHCP01 is down.
That’s it! Congratulations to you; now that you have learned how to configure DHCP Load Balancing / Failover using Microsoft DHCP server available in Windows Server 2012 R2 (and any other Windows Server product).