DHCP Server Installation and Configuration

brian

In this post, we will install and configure a DHCP (Dynamic Host Configuration Protocol) server.

This post is part four of a home lab series that explains how to use Windows Server and Active Directory. In the earlier portions of this lab a Windows Server was installed, configured, and promoted to a domain controller (DC).

In this part of the lab DHCP service is added to the DC, so a client device logged onto the domain will automatically receive an IP address. The DHCP server will be configured as if it is operating in a real business.

You’ll create multiple scopes, define exclusions, set DHCP options, adjust lease times, and create reservations — all using the DHCP management console.

Benefits of DHCP

DHCP automatically (or dynamically) assigns IP addresses and network settings to devices that connect to a Windows network. Without DHCP you need to manually configure settings for each device that connects to a network.

Manual configuration is difficult to manage in larger organizations with hundreds of devices on the same network. It is prone to errors that can prevent devices from joining a network or create conflicts when multiple devices use the same IP address.

Proper DHCP settings are integral to business networks. Incorrect DHCP settings can create various connectivity issues and should be verified when troubleshooting networking issues.

Settings Provided by DHCP

DHCP provides several settings that allow devices to properly communicate on a network:

  • IP Address – the unique identifier for each device on the network.
  • Subnet Mask – identifies the portions of the IP address that represent the network and the host (individual device). Traffic sent to a local network device is directed to a switch. Traffic sent to an external device (not on the local network) is directed to a router.
  • Default Gateway – the router’s IP address.
  • DNS Servers – the addresses of DNS servers that translate human readable addresses (techwayfarer.com) into IP addresses.
  • DNS Suffix – the domain name suffix applied to short hostnames. DHCP announces the DNS suffix. Then a device on the network can be found using the unqualified name (server1) instead of the fully qualified domain name (server1.techwayfarer.com).

Static vs Dynamic IP Addressing

Windows networks use a combination of static and dynamic IP addressing.

Static IP addresses are often used for:

  • Servers
  • Printers other shared devices
  • Routers and switches
  • Security devices

Dynamic IP addresses are often used for:

  • User computers and phones
  • Guest devices
  • IoT devices

Install DHCP

In the Server Manager Dashboard click on “Add roles and features.”

The Add Roles and Features Wizard will open.

In the Before You Begin tab click Next.

In the Installation Type tab choose “Role-based or feature-based installation” and click Next.

In the Server Selection tab make sure the server is chosen from the server pool. Note that the server name (DC01.techwayfarer.com) has changed to reflect that is part of the domain we created earlier. Click Next.

In the Server Roles tab choose “DHCP Service”, and the “Add Roles and Features Wizard” will appear. Click “Add Features” and then Next.

In the Features tab choose Next.

A DHCP Server tab will appear since we have chosen to install DHCP. Click Next.

In the Confirmation tab click Install.

When the DHCP service is installed click Close and restart the server.

Create DHCP Scope

The DHCP scope is the range of IP addresses that can be assigned to client devices in the domain by the DHCP server. To set the DHCP scope open the Server Manager window, click on the Tools menu, and choose DHCP. The DHCP configuration widows will appear.

In the left window pane click on the name of the server. The IPv4 and IPv6 submenus will show a red cross indicating that DHCP has not yet been configured.

Right click on IPv4 and choose New Scope.

The New Scope Wizard window will open, where we will enter the IP address range for the DHCP service. Click Next.

In the Scope Name window, enter a name and description for the scope and click Next. The values were determined in an earlier step of this lab.

In the IP Address Range window, enter the values for the IP range. Verify that the Subnet mask is correct and click Next.

In the “Add Exclusions and Delay” screen enter any IP addresses within your IP range that you don’t want assigned automatically to client devices. For instance, a printer or a server may be assigned a static IP address, and you don’t want the same IP address assigned to a client device using DHCP. For this lab, there are no static IP addresses assigned within the DHCP scope, so we will leave the fields blank and click Next.

The Lease Duration window allows us to specify an expiration period for an IP address assigned to a client device.

A client device will renew its lease duration each time it comes online. If a client device stays online continuously, it will attempt to renew the lease at the 50 percent point in its lease duration period (e.g., after four days if using an eight-day lease duration). If unsuccessful at the 50 percent point, it will attempt to renew the lease again at 87 percent of the lease duration period.

If the lease duration period expires without the DHCP server responding, the client will assign itself an APIPA address in the range of 169.254.0.1 to 169.254.255.254. APIPA stands for Automatic Private IP Addressing and it allows a device to maintain local network communication even when DHCP is unavailable.

We are not concerned with lease limits for our lab so click Next.

In the Configure DHCP Options window make sure Yes is selected and click Next.

In the Router (Default Gateway) window enter the IP address. Earlier in the lab we decided that the gateway for the Windows domain will be the home router. So the default gateway provided to client devices on the windows domain will be 192.168.1.1. Click the Add button and then Next.

In the “Domain Name and DNS Servers” window, verify the correct values are entered for the Parent domain and the DNS IP address. The values are automatically entered because the domain name and DNS server were configured earlier in the lab. Click Next.

The next window is titled “WINS Servers” that relates to an older technology used with NetBIOS names. For this lab, you can leave the fields blank and click Next.

In the Activate Scope window verify that yes is chosen to activate the scope immediately and click Next.

In the next window titled “Completing the New Scope Wizard” click Finish.

The DHCP configuration window still shows red crosses next to IPv4 and IPv6.

Right click on the server name (dc01.techwayfarer.com) and choose Authorize. Then right click on the name again and choose Refresh.

There should now be green check marks next to IPv4 and IPv6. If you open the IPv4 folder the details of the Scope are visible.

from the blog

Featured posts