Windows Server 2025 / How to Install DHCP and Create a Scope
Dynamic Host Configuration Protocol (DHCP) leases IP addresses and settings such as DNS to clients. On Windows Server 2025, install the role, configure a scope and options, then activate it; domain deployments also require checking AD authorization.
Plan a range on an isolated network
DHCP affects other clients on the same network. Use only the isolated 172.24.50.0/24 virtual network and check that a hypervisor NAT service is not already distributing leases.
| Setting | Lab value |
|---|---|
| Server | DC1, static 172.24.50.10 |
| Dynamic range | 172.24.50.100–172.24.50.150 |
| Mask | 255.255.255.0 |
| DNS | Working DC1 DNS at 172.24.50.10 |
| Gateway | Unset where no router exists |
| Test client | CLIENT1, managed through its console |
Server addresses .10, .11, and .20 are outside the pool. Production planning also compares existing static addresses, reservations, and other scopes. See DHCP scope concepts.
Run at the DC1 console. At this point in the course DC1 can still be standalone. Also inspect Server Manager’s post-installation notification:
Install-WindowsFeature -Name DHCP -IncludeManagementTools Get-WindowsFeature -Name DHCP Get-Service -Name DHCPServer Get-DhcpServerv4Binding
Confirm the binding serves only the isolated adapter, including after NIC changes. A domain DHCP server requires appropriate AD authorization. Follow Microsoft’s DHCP setup guide and do not run Add-DhcpServerInDC before a domain exists. Recheck authorization after promoting DC1 later.
Create an inactive scope and inspect options
Use DHCP Manager, dhcpmgmt.msc, under DC1 → IPv4 → New Scope, or the following alternative. Do not recreate an existing scope:
Add-DhcpServerv4Scope -Name 'Lab Clients' -StartRange 172.24.50.100 -EndRange 172.24.50.150 -SubnetMask 255.255.255.0 -State InActive Set-DhcpServerv4OptionValue -ScopeId 172.24.50.0 -DnsServer 172.24.50.10 -DnsDomain 'lab.example.test' Get-DhcpServerv4Scope Get-DhcpServerv4OptionValue -ScopeId 172.24.50.0
The current suffix is lab.example.test. Distributing it neither creates an AD domain nor joins a client. After domain deployment, change the suffix to ad.example.test and verify client renewal. Do not invent option 003 Router where no router exists. Choose and record a lease duration suited to the lab rather than arbitrarily shortening it.
Activate and verify the client lease
Confirm isolation and absence of competing DHCP services before activating:
Set-DhcpServerv4Scope -ScopeId 172.24.50.0 -State Active
- At the CLIENT1 console, record current IP and DNS settings.
- Set IPv4 address and DNS acquisition to automatic.
- Renew and inspect the client settings.
- In DHCP Manager, compare its lease address and client identifier with CLIENT1.
ipconfig /renew ipconfig /all
Expect an address within .100–.150 and DNS .10, not necessarily the first available address .100. On DC1, inspect lease and scope statistics:
Get-DhcpServerv4Lease -ScopeId 172.24.50.0 Get-DhcpServerv4ScopeStatistics -ScopeId 172.24.50.0
Troubleshoot and reverse the lab changes
A 169.254.x.x address suggests no usable lease. Check client automatic settings, switch membership, active scope, free addresses, binding, and applicable authorization. An address from the home router suggests failed isolation or another DHCP service.
To stop this exercise, deactivate the scope and restore CLIENT1’s recorded static settings. Stopping a server does not instantly erase existing leases. Check that distribution stops and the client is recovered before considering role removal:
Set-DhcpServerv4Scope -ScopeId 172.24.50.0 -State InActive
Keep the scope for reservation exercises if continuing. A lease row proves address allocation, not DNS registration or successful domain joining.




