How to Install and Configure a DHCP Server in Windows Server


DHCP (Dynamic Host Configuration Protocol) automatically gives IP addresses, subnet masks, gateways and DNS settings to every device that joins the network, so you do not have to configure each computer by hand. Windows Server includes a full DHCP server role, and setting it up is a standard part of learning Windows administration.

Step 1: Install the DHCP Server Role

In Server Manager, choose Add Roles and Features, select DHCP Server, complete the wizard, and finish with the DHCP Configuration Wizard it launches afterwards. Or do it in one PowerShell command:

Install-WindowsFeature DHCP -IncludeManagementTools

Step 2: Authorize the DHCP Server

In an Active Directory domain, a DHCP server must be authorized before it is allowed to hand out addresses; this prevents rogue DHCP servers. In the DHCP console, right-click the server name and choose Authorize (in PowerShell: Add-DhcpServerInDC). Give it a minute, then refresh the console.

Step 3: Create a Scope

A scope is a pool of addresses the server can lease out:

  1. Right-click IPv4 in the DHCP console and choose New Scope.
  2. Name the scope (for example Lab-LAN) and define the IP range, such as 192.168.10.100 to 192.168.10.200 with subnet mask 255.255.255.0.
  3. Add exclusions for static devices: your router, servers and printers should sit outside the lease pool (or be excluded), for example 192.168.10.1 to 192.168.10.20.
  4. Set the lease duration — 8 days is the default; use shorter leases (hours) in labs.

Step 4: Configure Scope Options

Options are settings delivered with the lease. Configure at least:

  • 003 Router: the default gateway, e.g. 192.168.10.1
  • 006 DNS Servers: your domain controller running DNS, or a public resolver such as 8.8.8.8
  • 015 DNS Domain Name: your lab domain name, if you run Active Directory

Then activate the scope — it will not serve addresses until it is activated.

Step 5: Test a Lease

Connect a client machine to the same network and run:

ipconfig /release then ipconfig /renew

The client should receive an address from your pool, which you can confirm in the DHCP console under Address Leases.

Related Content