Setting up DHCP on Windows Server lets your server automatically assign IP addresses, subnet masks, default gateways, and DNS server addresses to devices on your network. Without DHCP, every device needs a manually configured static IP — impractical at any scale. This guide covers how to install the DHCP Server role, configure a scope, and manage leases on Windows Server.
Install the DHCP Server Role
- Open Server Manager → Manage → Add Roles and Features
- Select Role-based or feature-based installation
- Tick DHCP Server and click through the wizard
- Click Install
Via PowerShell:
Install-WindowsFeature -Name DHCP -IncludeManagementTools
After installation, Server Manager displays a yellow notification flag. Click it and select Complete DHCP configuration to authorise the server in Active Directory (required before the DHCP service will hand out addresses on a domain network).
Authorise the DHCP Server in Active Directory
Rogue DHCP servers on a domain network cause serious problems. Active Directory prevents unauthorised DHCP servers by requiring explicit authorisation from a Domain Admin:
- Open DHCP Manager (Server Manager → Tools → DHCP)
- Right-click the server name in the left panel
- Select Authorise
- Refresh — the red down arrow should turn green, indicating the server is authorised and running
# Via PowerShell
Add-DhcpServerInDC -DnsName "dhcpserver.contoso.local" -IPAddress 192.168.1.10
Create a DHCP Scope
A scope defines the pool of IP addresses the DHCP server can assign, along with configuration options:
- In DHCP Manager, expand the server name, right-click IPv4 → New Scope
- Enter a name (e.g. “Office LAN”) and description
- Set the IP Address Range:
- Start IP: e.g. 192.168.1.100
- End IP: e.g. 192.168.1.200
- Subnet mask: e.g. 255.255.255.0
- Add any exclusions — IP addresses within the range that should not be assigned (for static devices like printers and servers that fall within the range)
- Set the lease duration — 8 days is the default. For stable office environments, longer leases (14–30 days) reduce DHCP traffic. For public Wi-Fi, shorter leases (2–4 hours) free addresses for transient devices.
- Configure scope options:
- Router (option 003): the default gateway IP (e.g. 192.168.1.1)
- DNS Servers (option 006): the IP address(es) of your DNS server(s) — for AD environments, use the domain controller IPs
- Domain Name (option 015): your domain name (e.g. contoso.local)
- Activate the scope when prompted
Create a Scope via PowerShell
# Create and configure a scope
Add-DhcpServerv4Scope -Name "Office LAN" -StartRange 192.168.1.100 -EndRange 192.168.1.200 -SubnetMask 255.255.255.0 -LeaseDuration 8.00:00:00
# Add scope options
Set-DhcpServerv4OptionValue -ScopeId 192.168.1.0 -Router 192.168.1.1 -DnsServer 192.168.1.10,192.168.1.11 -DnsDomain "contoso.local"
# Activate the scope
Set-DhcpServerv4Scope -ScopeId 192.168.1.0 -State Active
Create DHCP Reservations
A reservation permanently assigns a specific IP address to a device based on its MAC address — ensuring the device always gets the same IP while still being managed by DHCP:
# Add a reservation (MAC address without hyphens or with, both work)
Add-DhcpServerv4Reservation -ScopeId 192.168.1.0 -IPAddress 192.168.1.50 -ClientId "00-1A-2B-3C-4D-5E" -Description "Network Printer - HP LaserJet"
In the GUI: DHCP Manager → IPv4 → [scope] → Reservations → right-click → New Reservation.
View and Manage Active Leases
# List all active leases in a scope
Get-DhcpServerv4Lease -ScopeId 192.168.1.0 | Select-Object IPAddress, HostName, ClientId, LeaseExpiryTime | Sort-Object IPAddress
# Find a lease by hostname
Get-DhcpServerv4Lease -ScopeId 192.168.1.0 | Where-Object {$_.HostName -like "*LAPTOP01*"}
# Release a specific lease
Remove-DhcpServerv4Lease -IPAddress 192.168.1.150
DHCP Failover — High Availability
A single DHCP server is a single point of failure. If it goes down, new devices and devices renewing leases cannot get an IP. Windows Server supports DHCP Failover — two DHCP servers share the scope and can serve leases independently:
- In DHCP Manager, right-click the scope → Configure Failover
- Add the partner server name
- Choose Hot Standby (one active, one standby) or Load Balance (both active, split the lease pool)
Load Balance mode is recommended for most environments — both servers actively serve leases and either can handle the full load if the other fails.
Common DHCP Problems
Devices getting 169.254.x.x addresses: this is a self-assigned APIPA address — the device could not reach a DHCP server. Check the DHCP service is running (Get-Service DHCPServer), the scope is activated, and no firewall is blocking UDP port 67/68.
Scope is full (no free addresses): increase the scope range, reduce the lease duration, or check for address exhaustion from rogue devices. Run Get-DhcpServerv4ScopeStatistics to see current utilisation.