Docs / Windows Server / How to Set Up DHCP on Windows Server

How to Set Up DHCP on Windows Server

By Admin · Mar 2, 2026 · Updated Apr 24, 2026 · 26 views · 3 min read

How to Set Up DHCP on Windows Server

Dynamic Host Configuration Protocol (DHCP) automates IP address assignment for devices on your network. Setting up a DHCP server on your Kazepute Breeze eliminates the need to manually configure IP addresses on each client. This guide covers installation, scope configuration, and ongoing management.

Prerequisites

  • A Kazepute Breeze running Windows Server 2019 or 2022
  • A static IP address on the server (DHCP servers must have static IPs)
  • Administrator access
  • A planned IP address range for clients

Install the DHCP Server Role

# Install DHCP Server
Install-WindowsFeature -Name DHCP -IncludeManagementTools

# Verify installation
Get-WindowsFeature DHCP

Authorize the DHCP Server

If your server is part of an Active Directory domain, you must authorize it:

# Authorize the DHCP server in Active Directory
Add-DhcpServerInDC -DnsName "server.corp.example.com" -IPAddress 10.0.0.5

# Verify authorization
Get-DhcpServerInDC

For standalone servers (not domain-joined), this step is not required.

Create a DHCP Scope

A scope defines the range of IP addresses the server can assign:

# Create a new scope
Add-DhcpServerv4Scope -Name "Office Network" `
    -StartRange 10.0.0.100 `
    -EndRange 10.0.0.200 `
    -SubnetMask 255.255.255.0 `
    -LeaseDuration 8.00:00:00 `
    -State Active

# Verify the scope
Get-DhcpServerv4Scope

Configure Scope Options

Set the default gateway, DNS servers, and other options for clients:

# Set the default gateway (router)
Set-DhcpServerv4OptionValue -ScopeId 10.0.0.0 -Router 10.0.0.1

# Set DNS servers
Set-DhcpServerv4OptionValue -ScopeId 10.0.0.0 -DnsServer 10.0.0.5, 8.8.8.8

# Set the domain name
Set-DhcpServerv4OptionValue -ScopeId 10.0.0.0 -DnsDomain "corp.example.com"

# View all scope options
Get-DhcpServerv4OptionValue -ScopeId 10.0.0.0

Add Exclusion Ranges

Exclude specific IP addresses from being assigned by DHCP:

# Exclude a range (for static devices like printers)
Add-DhcpServerv4ExclusionRange -ScopeId 10.0.0.0 -StartRange 10.0.0.100 -EndRange 10.0.0.110

# View exclusions
Get-DhcpServerv4ExclusionRange -ScopeId 10.0.0.0

Create IP Reservations

Reserve specific IP addresses for devices by MAC address:

# Reserve an IP for a specific device
Add-DhcpServerv4Reservation -ScopeId 10.0.0.0 `
    -IPAddress 10.0.0.150 `
    -ClientId "AA-BB-CC-DD-EE-FF" `
    -Name "Office Printer" `
    -Description "Main office printer"

# List all reservations
Get-DhcpServerv4Reservation -ScopeId 10.0.0.0 | Format-Table IPAddress, ClientId, Name

Configure DHCP Failover

For high availability, set up DHCP failover between two Breezes:

# Configure load-balance failover
Add-DhcpServerv4Failover -Name "DHCP-Failover" `
    -PartnerServer "dhcp2.corp.example.com" `
    -ScopeId 10.0.0.0 `
    -LoadBalancePercent 50 `
    -SharedSecret "FailoverSecret123!" `
    -AutoStateTransition $true `
    -MaxClientLeadTime 1:00:00

# Verify failover
Get-DhcpServerv4Failover

Monitoring and Troubleshooting

# View current leases
Get-DhcpServerv4Lease -ScopeId 10.0.0.0 | Format-Table IPAddress, ClientId, HostName, LeaseExpiryTime

# View scope statistics
Get-DhcpServerv4ScopeStatistics -ScopeId 10.0.0.0

# View DHCP server statistics
Get-DhcpServerv4Statistics

# Check DHCP audit logs
Get-Content "C:\Windows\System32\dhcp\DhcpSrvLog-*.log" -Tail 50

Best Practices

  • Always use a static IP on the DHCP server itself.
  • Set appropriate lease durations — shorter for wireless networks, longer for wired.
  • Configure DHCP failover for redundancy in production environments.
  • Use IP reservations for servers, printers, and other infrastructure devices.
  • Monitor scope utilization and expand address ranges before they are exhausted.
  • Enable DHCP audit logging for troubleshooting and compliance.
  • Document all scopes, exclusions, and reservations.

Was this article helpful?