CONFIGURING HIGH AVAILABILITY ON DHCP SERVER ROLE
We always need a Failover or Load Balancer for our Network continuity (High Availability). Today I am going to discuss DHCP failover or Load Balance Scenario which will help us to give redundancy over DHCP failure.
Before we start configuring High Availability on DHCP Server Role in Windows Server 2016, just recap the memories from the past that how Microsoft DHCP server has improved over the versions.
- Windows Server 2000/2003– DHCP Failover cluster was possible through windows cluster, this legacy configuration wasn’t a best thing as it had loads of configuration hurdles but still it was the only option to achieve it.
- Windows 2008/2012– The DHCP Failover feature allows the High Availability of the service without using cluster services. But one has to have NAP (network access protection) policy in place. It replicates all the configuration to partner server.
- Windows server 2016– The DHCP failover feature doesn’t require NAP from Windows 2016 onwards which make it quite easy to configure failover or load balance. We are going to discuss the same today.
Installation of DHCP Server
In this Scenario, two DHCP servers are created (in real scenario it can be different sites) that will be configured on Load Balance mode (50%-50% share) and we are going to test with two client machines those get the IP addressed from these DHCP Servers.
Here it starts:
DHCP Server -1 (MS Windows Server 2016)
- Open Server Manager
- Click on Add Roles and features
- In the Before you Begin, a welcome page will be displayed. Click on Next.
- In the Select Installation Type, leave the default setting, which is Role-based or feature-based installation, and click Next
- In the Select destination server, the local server should be listed, and click Next.
- In the Server Roles, select DHCP Server. A new dialog box will be displayed. Click on Add Features
- Back to the wizard, just click Next
- In the Features, click Next.
- Click another Next in DHCP Server
- Click Install on confirmation
- Wait for the installation to be completed
- Repeat the same steps on another DHCP server
- Once completed, a new message will pop-up in notification of Server manager to complete the DHCP Configuration. Click on Link.
- DHCP Post install configuration wizard will be launched which is basically creates the Security Groups of DHCP to delegate DHCP admin rights. Click on Commit
- Once completed. Click Close
Once DHCP Role gets installed on both servers. Next step is to create a new DHCP Scope on DHCP Server-1 only (don’t create it on another DHCP server)
- Open a DHCP manager, by msc command or open it from Administrative Tools
- Select IPV4 right click and select New Scope
- New Scope wizard will be launched, click Next
- Provide a desired name, click Next
- Enter desired DHCP IP range and subnet mask, Click Next
- Ideally click Next on other 2 options (as default) that have IP exclusion and IP Lease duration
- Click Next on Yes, I want to configure these options now.
- Add Default Gateway IP address in Router, click Next
- Add DNS servers and domain name, click next
- Select Yes, I want to activate the scope now option and click Next and finish the wizard.
Now, next steps are the main for this blog written that is to create a Failover/HA DHCP.
- Go to same DHCP Console and right click on IPV4 and select Configure Failover.
- A new wizard will be opened. Please check for available Scopes if you have more than one and you don’t want it to include in failover then you may deselect the same. By default all are selected. Click Next
- Add Partner DHCP Server (second DHCP Server), Click Add Server and enter IP address of the another DHCP server (it can also show up authorize DHCP server in AD)
- Click OK and Next
- Next is Failover Relationship Screen, enter or change the Relationship Name, Check State Switchover Interval and uncheck Enable Message Authentication then click Next
- Click Next and Click Finish
- Configure Failover Progress will be in pop-up window. Usually it take seconds to complete (depend on Network)
Now you have successfully configured DHCP failover/ HA in Load Balance Mode. Which means whatever DHCP will assign will be shown on both server and will be assigned on 50-50 ratio.
Please Note:- There is no Virtual IP being configured over the network for DHCP (which is the best part) so if your using DHCP beyond router then IP helper will have 2 DHCP IPs to provide the failover or load balance and if it is local LAN then there will be no conflict of DHCP both server will assign IPs and in case one is down then other will automatically work without any intervention or failover (o downtime)
Since we have configured DHCP failover it is a time to check that DHCP Scope is replicated to other server and both are active.
DHCP Server 1
DHCP Server 2
Scope is replicated and Active on both servers. Now let’s check if both of these servers are assigning IP Addresses as per desired configuration.
Client Machine 1
Both machines got IPs from different DHCP servers as Highlighted above. Checking if both of this IPs assignment are populated in both DHCP Servers
DHCP Server 1
DHCP Server 2
Both servers are in sync and working as per expectation. That’s it in configuring High Availability on DHCP Server Role in Windows Server 2016.