Configuring DHCP Failover
To set up a highly available DHCP service across a hybrid environment, you must establish a relationship between an on-premises server and an Azure-based server. The first step is deploying a Windows Server virtual machine in Azure and installing the DHCP server role on it. This Azure server will work in partnership with your on-on-premises DHCP server. To allow the servers to communicate properly, you must configure their network adapters using specific commands (weakhostreceive and weakhostsend) to ensure they can send and receive traffic on the correct interfaces. Finally, you configure a DHCP relay agent on your on-premises network devices to forward client requests to the Azure DHCP server's IP address.
Choosing a Failover Mode
You configure the partnership between the two DHCP servers by choosing a failover mode. In load-balancing mode, the two servers share the client request load, each handling a portion of the IP address leases. This mode provides active-active high availability. In hot-standby mode, one server (the primary) handles all client requests while the other (the standby) remains idle, ready to take over only if the primary fails. This mode is useful when you have a clear primary location and a backup location.
Monitoring and Testing
After configuration, you must monitor the replication health between the partner servers to ensure lease information and scope settings are synchronized. The DHCP management console provides status information for this purpose. To fully validate the setup, you should conduct simulated failover tests. This involves intentionally disabling the primary server to verify that the secondary server seamlessly begins handing out IP addresses, ensuring continuous service for network clients without interruption.