Microsoft’s DHCP Failover

Microsoft‘s DHCP Failover

One of the new cool features in Windows Server is DHCP Failover. Think of it as a way to replicate your DHCP across two servers in order to provide failover or load balancing a DHCP Service. DHCP failover in Windows Server® 2012 is a new feature that enables two Microsoft DHCP servers to share service availability information with each other, providing DHCP high availability. DHCP failover works by replicating IP address leases and settings in one or more DHCP scopes from a primary DHCP server to a failover partner server.All scope information is shared between the two DHCP servers, including active leases. This enables either DHCP server to assume responsibility for DHCP clients if the other server becomes unavailable.

This is a great feature as high availability becomes more mainstream due to lower costs and virtualization. Many enterprises have two Domain Controllers, two DNS servers, but what happens when you one and only DHCP server goes down? This generally is not a big issue as DHCP leases last a while so only new clients looking for an IP address might not be able to join the network. However, it is always good to have a backup in case you need to restart your server and you want to avoid any downtime for your clients. Other entities might find more value to DHCP failover as their leases might be short in time or there is a constant flux of clients (think wireless in an open network like a school).

Regardless, setting up DHCP failover is quite simple. There are just a few things to keep in mind:

  • You might have issues installing a second DHCP server on your network. Read the following article Error 0x800f0922 while adding DHCP role on Windows Server to make sure you can complete the installation.
  • I haven’t been able to resolve this yet. One of my DHCP servers cannot start if the other server is running. I need to pause the running server in order to start the other DHCP server. Funny it only works one way not both. I´ll update this post once I figure out why that is. But it is possible to have them both running at the same time.
  • If you ever need to break the failover relationship but the wizard won’t let you, you can force it following this instructions: How to: Delete a DHCP Failover relationship when the partner server is unreachable

In order to setup DHCP failover all you have to do is follow these simple steps:

I. Configure DHCP failover using the DHCP console

To configure DHCP failover using the DHCP console, right-click a DHCP scope or right-click IPv4 and then click Configure Failover.

 

The Configure Failover wizard guides you through configuring DHCP failover on the selected scope.

II. Configure DHCP failover using Windows PowerShell

To configure DHCP failover using the command line, use the Add-DhcpServerv4Failover Windows PowerShell cmdlet to create a new DHCP failover relationship and add a DHCP scope, or use the Add-DhcpServerv4FailoverScope cmdlet to add a new scope to an existing failover relationship. An example of the Add-DhcpServerv4Failover cmdlet is provided below.

Add-DhcpServerv4Failover –ComputerName dhcp1.Bauzas.com –PartnerServer dhcp2.Bauzas.com –Name dhcp1-dhcp2 –ScopeID 10.10.10.0 –LoadBalancePercent 70 –SharedSecret sEcReT (You can use -Force if you need to)

For information more information about configuring DHCP failover with Windows PowerShell, see DHCP Server Cmdlets in Windows PowerShell.

PowerShell users can use the following cmdlets for setting up and monitoring failover:

Add–DhcpServerv4Failover  – Adds a new IPv4 failover relationship on the DHCP server.

Add–DhcpServerv4FailoverScope  – Adds the specified scopes to an existing failover relationship.

Get–DhcpServerv4Failover  – Gets the failover relationships configured on the server.

Set–DhcpServerv4Failover  – Modifies the properties of an existing failover relationship.

Remove–DhcpServerv4Failover  – Deletes the specified failover relationships.

Remove–DhcpServerv4FailoverScopeRemoves the specified scopes from the failover relationship.

Invoke-DhcpServerv4FailoverReplicationReplicates scope configuration between failover partner servers.

Enhanced by Zemanta

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.