Windows Server 2012 DHCP Failover Basics Tutorial

  

I. Overview
DHCP servers are an important part of the network infrastructure in most organizations, so make sure that DHCP services have high availability. There are many ways to achieve DHCP high availability. This article introduces the new DHCP high availability solution in Windows
Server 2012, and also analyzes the advantages and disadvantages of various high availability solutions for IT managers. Provide a reference when selecting a solution.

2. Text

1. Traditional DHCP High Availability Solution
Windows Server 2008 R2 and Windows Server 2003 The solution for implementing DHCP high availability is usually the following three types: 1) Windows failure The DHCP in the transfer cluster builds a cluster through two DHCP servers, and the DHCP service is used as a cluster service. The DHCP data is stored on the cluster storage. When the DHCP server of the active node is down or fails, the service is automatically migrated. Achieve high levels of availability to passive nodes. Challenge: DHCP data must be stored in shared storage, which makes storage a single point of failure and requires additional investment in storage redundancy, such as establishing dual storage. In addition, because it is based on computer cluster technology, the Windows server version must be Enterprise Edition; cross-site (Windows Server 2008 support) is not supported, making distributed deployment difficult; it also involves relatively complicated setup and maintenance. 2) Split the scoped DHCP. By splitting the scope of the DHCP, it is placed on two separate DHCP servers. For example, the scope of the DHCP1 scope is 1-150, and the scope of the DHCP2 scope is 151-254. service. Usually 80% of the addresses in the scope are assigned to the primary server, and the remaining 20% ​​are assigned to the secondary server, which is often referred to as the 80/20 principle. The 50/50 principle can also be used. When there is a problem with the primary server, the client can obtain an IP configuration from another secondary server, enabling server redundancy and high availability of DHCP services. Challenge: The data of the two servers in the split scope is not synchronized, and the IP address continuity cannot be provided. More than 20% of the IP addresses must be used as the backup IP address pool. If the IP address pool in the enterprise is not sufficient, It is recommended to choose this solution; if many reserved MAC addresses are set in the enterprise, the solution also increases the maintenance cost because both DHCP servers need to be added. 3) Use hot standby DHCP. All the data of the DHCP is stored in the primary DHCP server. The primary DHCP provides the IP lease and management services in the enterprise. At the same time, a hot standby DHCP server is deployed to synchronize data through scripts or manual backup. When the primary DHCP is down, manually modify the IP address of the hot standby DHCP server or modify the DHCP relay agent in the switch to implement manual switchover, reduce the time of DHCP service interruption, and improve availability. Challenge: Because the solution needs to be switched by the manual method, the administrator obtains the notification. Before the configuration is completed, the DHCP service is interrupted for a period of time. The high availability of the solution is relatively low. Obtaining the peak period of the IP address, such as going to work at 9:00 in the morning, will have a very large impact. All of the above three solutions have defects in one aspect. Enterprises often choose different solutions according to their own situations and different points of concern for high availability. DHCP failover in Windows Server 2012 is a new way to achieve high availability for the client's DHCP service. Allows two DHCP servers to synchronize lease information with each other. In this way, if one DHCP server fails, another DHCP server can provide an address for all clients in the subnet. This approach allows administrators to deploy DHCP services with high recovery and high availability, without the problems faced by the three traditional solutions discussed previously, to better meet the needs of large enterprises.

2. DHCP Failover Architecture
DHCP failover has two modes: load sharing mode and hot standby server mode. Each DHCP scope can only choose to use one of the modes, and the scope can only be used on up to two servers, that is, only two DHCP servers can be used to establish a failover relationship. 1) Load sharing mode Load sharing mode is the default mode. In this mode, two servers provide IP addresses and option services for clients in a given subnet simultaneously. The client requests load balancing and sharing between the two servers. The load sharing model is best suited for deployment of servers with two failover relationships at the same physical site, such as the group headquarters. Both servers respond to DHCP client requests simultaneously based on the load distribution ratio configured by the administrator. Load sharing for centralized deployment (single-site, multi-subnet) In the following example, two DHCP servers provide IP addresses to clients simultaneously on multiple subnets. Configuring the relay agent No matter which working mode is used, you need to configure the relay agent in the router to apply for the IP address of the client across the network segment. For DHCP failover using load sharing mode, you need to configure two relay proxy addresses in the router, that is, two DHCP servers IP addresses that are mutually loaded. The router will calculate which DHCP server should be sent according to RFC 3074. To get IP lease information. About RFC 3074: Defines an algorithm for implementing DHCP server load balancing based on MAC address. It can send DHCP requests with different MAC addresses to different DHCP servers, thus implementing load balancing of DHCP servers. Cisco DHCP server supports RFC. 3074, therefore, can achieve redundancy switching and load balancing. 2) The hot standby server mode is divided into a primary DHCP server and a secondary DHCP server in the hot standby server mode, and the two servers operate in a failover relationship, wherein the primary server is responsible for Rent configuration information such as IP addresses to all clients in the scope or subnet. The secondary server will poll the primary server to confirm whether it works. If it works normally, the secondary server does not respond to the DHCP request sent by the client. The primary server will update its DHCP database to the secondary server synchronously. When the primary server fails, The secondary service provides a response to the IP lease. This model is suitable for enterprises in the group headquarters (data center) and branch offices, where there are many branches and the network uses LAN connection. The servers at the group headquarters can act as backup servers for the branches' servers. The following figure shows an example of a relay agent configuration for a central and branch deployment: configuring a relay agent on the switch and setting the priority of the DHCP server. The local branch office DHCP server takes precedence. Once the primary DHCP failure is detected, the switch performs the following steps. Switch between active and standby.

3. Summary of DHCP failover advantages based on Windows Server 2012
DHCP failover is not a completely new technology. In the early years, it has been implemented in Linux/Unix or in network routing devices such as Cisco and H3C. But the introduction in Windows is still the first time. It provides a highly available DHCP service without the disadvantages of clustering or splitting the scope of DHCP, while also avoiding the manual operation of the Hot Standby DHCP scheme. The overall effect is still good. Advantages of DHCP failover include: Easy: Deployed as a wizard to create a DHCP failover relationship between DHCP servers. The wizard automatically copies scopes and settings from the primary server to the failover partner. Flexible: DHCP failover can also be configured for load balancing, distributing client requests between two DHCP servers based on selected values ​​in a failover relationship, supporting more user groups and providing a quick access to IP addresses Customer Experience. Seamless: The DHCP server shares lease information, allowing another server to assume responsibility for the service client when one server is unavailable. When renewing a lease, the DHCP client can retain the same IP address even if the lease is issued by another DHCP server.

Copyright © Windows knowledge All Rights Reserved