DHCP Configuration and Failover Setup

From Notes_Wiki
Revision as of 13:23, 22 October 2025 by Ansil (talk | contribs) (Created page with " Home > Windows > Windows Server Roles and Features > DHCP Configuration and Failover Setup = '''DHCP Configuration and Failover Setup''' = == '''Overview''' == '''Dynamic Host Configuration Protocol (DHCP)''' is a network service that automatically assigns IP addresses and other network parameters to devices on a network. Configuring '''DHCP Failover''' between two servers ensures high availability and load balancing of DHCP services. In...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Home > Windows > Windows Server Roles and Features > DHCP Configuration and Failover Setup

DHCP Configuration and Failover Setup

Overview

Dynamic Host Configuration Protocol (DHCP) is a network service that automatically assigns IP addresses and other network parameters to devices on a network. Configuring DHCP Failover between two servers ensures high availability and load balancing of DHCP services.

In this guide, we will configure DHCP on two servers (Server1 and Server2) and set up failover to provide redundancy.


1. DHCP Configuration on Server1

Step 1: Install the DHCP Role

1. Open Server Manager and click on Add Roles and Features. 2. Select Role-based or feature-based installation → click Next. 3. Select the local server and click Next. 4. Choose DHCP Server → click Add Features when prompted. 5. Click NextNextInstall. 6. Wait for the installation to complete, then click Complete DHCP Configuration.

Step 2: Configure DHCP Server

1. In the post-installation wizard, provide credentials for DHCP authorization (domain admin). 2. Click Commit → then Close.

Step 3: Create a New DHCP Scope

1. Open the DHCP Console from Server Manager → Tools → DHCP. 2. Expand the server name → right-click IPv4 → select New Scope. 3. Click Next and provide a name for the scope (e.g., MainLAN-Scope). 4. Click Next. 5. Define the following:

  * Start IP Address: (e.g., 192.168.1.10)  
  * End IP Address: (e.g., 192.168.1.200)  
  * Subnet Mask: (e.g., 255.255.255.0)  

6. Click Next.

Step 4: Configure Exclusions and Lease Duration

1. Add any Exclusions if certain IPs should not be assigned dynamically, or leave blank → click Next. 2. Set the Lease Duration (default: 8 days) → click Next.

Step 5: Configure DHCP Options

1. Choose Yes, I want to configure these options now → click Next. 2. Add the following options:

  * Router (Gateway): e.g., 192.168.1.1  
  * DNS Server: IP of your DNS server (e.g., 192.168.1.10)  
  * Domain Name: your AD domain (e.g., example.local)  

3. Click NextNextActivate ScopeFinish.


2. DHCP Configuration on Server2

Step 1: Install the DHCP Role

1. Open Server Manager → select Add Roles and Features. 2. Choose Role-based or feature-based installation → click Next. 3. Select the server → click Next. 4. Choose DHCP Server → click Add Features. 5. Click NextInstall. 6. Wait for installation to finish, then click Complete DHCP Configuration. 7. Enter domain administrator credentials if prompted. 8. Click NextClose.

Step 2: Verify DHCP Installation

1. Open the DHCP Console on Server2. 2. Ensure that IPv4 is listed and the server is authorized.


3. Configure DHCP Failover Between Server1 and Server2

Step 1: Initiate Failover from Server1

1. On Server1, open the DHCP Console. 2. Right-click on IPv4 and select Configure Failover. 3. Click Next. 4. Select the DHCP scope(s) to be included in failover → click Next.

Step 2: Add Partner Server

1. Click Add Server. 2. Select Server2 from the list or manually enter its name/IP. 3. Click OKNext.

Step 3: Configure Failover Options

1. Enter a descriptive Relationship Name (e.g., DHCP-Failover). 2. Choose the failover mode:

  * Load Balance (default – distributes load evenly), or  
  * Hot Standby (Server1 active, Server2 standby).  

3. Set the Maximum Client Lead Time (MCLT) (default: 1 hour). 4. Provide a shared secret password for replication authentication. 5. Click NextFinish.

Step 4: Verify Failover Configuration

1. Confirm that the relationship status shows as Normal or Load Balancing. 2. Repeat on Server2 to verify replication. 3. You can test failover by stopping the DHCP service on one server and ensuring leases continue to be issued by the other.


4. Verification and Maintenance

  • Use the following PowerShell commands to verify configuration:

List DHCP Scopes

Get-DhcpServerv4Scope

Check Failover Relationship

Get-DhcpServerv4Failover

Check Authorized DHCP Servers

Get-DhcpServerInDC

Summary: This guide covers installation and configuration of DHCP roles on two servers, scope creation, and failover setup. DHCP Failover provides redundancy and ensures continuous IP address leasing even if one server fails, improving network reliability.


Home > Windows > Windows Server Roles and Features > DHCP Configuration and Failover Setup