Prior to 2012, to offer some sort of backup for DHCP, the DHCP scope either had to be hosted on a cluster or a messy way would be to split a DHCP scope in half so that half of the address range was hosted on one DHCP server and the other half of the scope hosted on a second DHCP server. Problem for these approaches was that you either needed to setup a cluster or although splitting a scope and hosting two separate DHCP servers does work if one was to fail you have lost the leases on that server and you now only have half of the scope available.
Windows Server 2012 introduces the ability to replicate scopes between two DHCP servers. With this replication, all the scope information is replicated between the two servers that have the replication relationship, including any leases. The relationship between the two DHCP servers can either be load balanced, where both servers are primary for a certain percentage of the scope (replicating leases between them), or put on hot standby, where only one DHCP server is actively leasing IP addresses and replicating those leases to the hot standby DHCP server that would take over in the event of a failover. The properties of the replication relationship appear in the screen shot below.
Start off by going into your server and open DHCP console.
- Expand your domain > IPv4“, on your “Primary/1st DHCP server”
- Right-click the DHCP scope, select “Configure Failover“.
- Check “Select all“, even if you only have the one scope.
On “Specify the partner server to use for failover” screen, click “Add Server“.
Select your secondary DHCP server This authorized DHCP server > for me my “Primary is Defiant, Secondary is enterprise”
- Click “OK“.
- Then Click “Next“
Change the options to suit your testing/setup:
Relation name: A unique failover relationship name is required to identify the failover setup between two servers. Since multiple failover relationships can exist with one or more DHCP servers, each relationship name is required to be unique on a server
- I changed “Maximum Client Lead Time“, to 1 min, but this is only for testing in production environment i have set it to default 1 hour.
- “Mode” i’ve gone for “Load balance“.
Mode: There are two modes for DHCP failover which are “Hot Standby” and “Load balance“.
In a load balance mode, which is the default mode of operation, the two servers simultaneously serve IP addresses and options to clients on a given subnet. The client requests are load balanced and shared between the two servers.
In hot standby, two servers operate in a failover relationship where an active server is responsible for leasing IP addresses and configuration information to all clients in a scope or subnet, while a secondary server assumes this responsibility if the primary server becomes unavailable.
- Provide the “Shared Secret”.
- Click “Next“
- Now check the configuration, as if your happy press “Finish“.
- Right click on the “Scope” and click “Properties“, click on the “Failover” you can see the setup has been applied and is working.
Enable Message Authentication: To configure message authentication, the DHCP failover setup wizard prompts the administrator to provide a shared secret. As part of the failover relationship creation, the failover setup wizard provisions the shared secret for message authentication to each of the servers in the failover relationship.