Windows Server DHCP Configuration – The Complete Guide

DHCP DORA

What Is DHCP and How It Works

To communicate on the network, each device needs an IP address.

This IP address will allow the device, whether a computer, a server, or a printer, to be visible to other devices in the network.

There are two ways to assign an IP address to a device: manually and dynamically.

You can assign an IP address manually if you have a few devices on your network, less than 10. More than that, it becomes challenging to do it manually.

Some organizations may have hundreds or thousands of devices in their network. In this case, a DHCP server would be of great help.

A DHCP server is a network management protocol that assigns IP addresses to devices that request it.

The acronym DHCP stands for Dynamic Host Configuration Protocol.

A DHCP server operates based on the client-server model.

When a device (the client) is first connected to the network, it sends a request to all devices on the network, asking if there is a DHCP server.

If a DHCP server exists, it will reply to the client by offering him an IP address.

The client will then request the IP address from the DHCP server.

Finally, the DHCP server assigns the client the IP address.

The four steps we described are often called DORA: Discovery, Offer, Request, and Acknowledge.

This guide will show you how to configure a DHCP server in Windows Server.

Install DHCP Role

It’s best practice to install a DHCP server on a dedicated server.

It is common for small companies to install the DHCP role on the domain controller server because of a lack of resources or convenience.

Installing additional roles on your domain controller increases the attack surface and can lead to performance issues.

Avoid this as you can.

To add the DHCP role using the PowerShell, open PowerShell with administrator privileges and type the following:

Install-WindowsFeature DHCP -IncludeManagementTools
Install the DHCP role by using PowerShell

Once the role is added, you need to complete the DHCP configuration. This creates the security groups you need to manage the DHCP server.

NB: Without authorizing the DHCP server on the active directory, domain-joined computers may not receive IPs from that DHCP server.

To do that, go to the Server Manager, click on the notification flag, then click on “Complete DHCP configuration

Server Manager – Complete DHCP Configuration

DHCP Post-installation configuration wizard

Use an administrator account to authorize the DHCP server in Active Directory.

DHCP Post-installation configuration wizard

The DHCP server is now configured and ready for use.

Create DHCP Scope

Now that your DHCP server is ready, the next step is creating the DHCP scope.

The DHCP scope is a range of IP addresses the DHCP server can lease out to DHCP clients.

But before starting to build your scope, it’s critical to do some planning.

Devices like servers, printers, and routers have static IP addresses. You must identify these addresses to exclude them from the DHCP pool.

Let’s take a simple example of design:

  • Local network: 192.168.1.0/24 (192.168.1.1 to 192.168.1.254)
  • Static IP addresses (servers, printers, routers…etc.): 192.168.1.1 to 192.168.1.30. Be sure to leave room for additional devices.
  • Dynamic IP addresses: 192.168.1.31 to 192.168.1.254

Configure and Activate the Scope

Click on “Tools” in the server manager, then click on “DHCP” to open the DHCP manager.

Server Manager: Open DHCP Manager

Right-click on IPv4 under the server node in the DHCP manager, then click on “New Scope“.

Create a New DHCP scope

Type the name of the scope;

DHCP scope name

Enter the scope’s start and end IP address, and ensure that the subnet mask is correct.

DHCP: IP Address Range

If you need to reserve some IPs in the range for a specific use or other devices (Ex, mobile devices), you can exclude them on this page.

DHCP: Add Exclusions

The lease duration specifies how long a client can use an IP address from this scope. The default value is 8 days.

DHCP: Lease duration

At this step, you must configure the most common DHCP options, such as the default gateway and DNS servers. Click “Yes, I want to configure these options now” and continue.

Configure DHCP Options

Enter the IP of the default gateway.

DHCP: Add Default Gateway

Specify the domain name the client computers on your network will use for DNS name resolution. If the server on which you installed the DHCP role is domain joined, it will populate the domain name in the “Parent domain” field.

Next, add the DNS server IPs the DHCP clients use for domain name resolution.

DHCP: Domaine Name and DNS Servers

WINS is a Microsoft proprietary protocol that resolves NetBIOS names of computers and servers to IP addresses. Nowadays, WINS servers are less used and are replaced by DNS servers. You can skip this step and click next.

DHCP: WINS Servers

Finally, you have to activate this scope.

Note that clients can obtain address leases only if a scope is activated.

The new scope is created and active.

Congratulations! You can now use your DHCP server to assign IPs to devices in your network.

Share this article

Leave a Reply