top of page

Installing DHCP on Your Windows Server VM

  • Writer: Logan Toms
    Logan Toms
  • Aug 30, 2023
  • 7 min read

Ensuring seamless communication within its network environment is paramount as we continue to set up the CaffinatedCoders company. Before connecting our employees' computers to the network, we must install and configure the Remote Access Server (RAS) and Dynamic Host Configuration Protocol (DHCP). These tools allow our Windows clients to be on our private virtual network and enable them to access the internet through the domain controller. This guide will dive deep into the installation and configuration process of both, aiming to provide a comprehensive understanding. Even if you're beginning your journey in network configurations, this guide makes the task approachable and straightforward.



Table of Contents



Terminology

  1. DHCP (Dynamic Host Configuration Protocol): A protocol that automatically assigns a unique IP address and other related configuration information, such as the subnet mask and default gateway, to devices on a network. This ensures seamless internal communication without conflicts.

  2. RAS (Remote Access Server): A server that acts as a gateway, allowing users to connect to an organization's internal network.

  3. NAT (Network Address Translation): A method to map an entire group of private IP addresses to a single public IP address before interacting with the internet.

  4. WINS (Windows Internet Name Service): An older system used to translate computer NetBIOS names into IP addresses.

  5. DNS (Domain Name System): DNS operates as a directory service, translating human-readable domain names (like "google.com") into IP addresses that computers use to locate each other on the network.



Pre-requisites: What You Need to Start


This guide assumes that you are using Windows Server 2019 and have Windows Active Directory installed. Links for these guides are provided below for easy access.



Installing Remote Access Server (RAS)


A Remote Access Server (RAS) is necessary to connect to an organization's internal LAN remotely. It acts as a central gateway and uses specialized software to authenticate users and provide access to resources such as data and applications. Setting up RAS will allow our Windows desktop clients to connect to our domain so our employees can access the necessary network resources.


Step 1: Access the Server

To install RAS on the server, log in to your Windows Server with the System Administrator account to obtain admin permissions.


Step 2: Access Server Manager

  1. Search for "Server Manager" within the Windows search bar on the lower left.

  2. Once opened, select the "Add roles and features" option on the Server Manager Dashboard.

IMG: Add Roles & Features

Step 3: Set Server Selection

  1. On the "Add Roles and Features Wizard," click "Next" until you reach the "Server Selection" page.

  2. Ensure that your main server is highlighted or selected for installation.

  3. Click "Next."

GIF: Set Server Selection

Step 4: Installing Remote Access Server (RAS)

  1. On the "Server Roles" page, locate and select the option for "Remote Access."

  2. Select "Next" three times until you reach the "Role Services" section.

  3. On the Role Services section, select "Routing." This feature is crucial as it manages traffic between different subnets within your Local Area Network (LAN).

  4. When prompted, select "Add Features." This will also automatically select "DirectAccess and VPN (RAS)." These features help facilitate connections to remote clients and offices.

  5. Click "Next" three times to get to the Confirmation section and select "Install."

GIF: Installing Remote Access Server (RAS)

Step 5: Navigate to "Routing and Remote Access"

  1. After installation is complete, on the Server Manager dashboard, select "Tools" located in the upper right.

  2. Within the dropdown menu, select "Routing and Remote Access."

IMG: Routing and Remote Access

Step 6: Configure and Enable Routing and Remote Access

  1. Within the Routing and Remote Access application, right-click the "DOMAINCONTROLLER" and select "Configure and Enable Routing and Remote Access."

  2. A Configure and Enable Routing and Remote Access Setup Wizard should appear; select "Next."

  3. On the "Configuration" page, select "Network address translation (NAT);" select "Next."

  4. On the "NAT Internet Connection" page, ensure "Use this public interface to connect to the Internet:" is selected.

  5. If you followed my Setup Windows Server VM for Active Directory: Guide, then we should have already identified which NIC communicates externally with the internet and which one communicates internally within our network. We will want to select our "EXTERNAL" NIC to connect to the internet. Select "Next."

  6. Select "Finish."

GIF: Configuring Routing and Remote Access

If successful, our DOMAINCONTROLLER should now appear in green.

IMG: Green DOMAINCONTROLLER

Setting up and configuring the Remote Access Server (RAS) allows users to access our network from their computers. Now that's established, we need to ensure that devices within the network can communicate effectively. This is where the Dynamic Host Configuration Protocol (DHCP) comes in. DHCP assigns unique IP addresses to devices on the network, facilitating internal communication without conflicts. Next, we will go through installing and configuring DHCP on our server.



Installing DHCP


Efficiently obtaining IP addresses in a dynamic network environment is crucial. This is where the Dynamic Host Configuration Protocol (DHCP) comes in. DHCP eliminates manual IP address configuration, reduces errors, and streamlines network management. It plays a pivotal role in any organized digital setting, automatically allocating IP addresses and ensuring seamless internal communication between devices. In this section, I will guide you through installing the DHCP Server on your Windows server.


Step 1: Access Server Manager

Begin by opening the Server Manager. Once you're on the dashboard, look for "Add roles and features" and click on it to initiate the setup process.


Step 2: Set Server Selection

  1. In the "Add Roles and Features Wizard," advance through the setup by clicking "Next." Keep going until you land on the "Server Selection" page.

  2. Here, it's essential to choose the correct server for the installation. Ensure your primary server is selected. Once done, proceed by clicking on "Next."

GIF: Set Server Selection

Step 3: Installing DHCP Server

  1. As you arrive at the "Server Roles" page, look through the list and select "DHCP Server."

  2. When prompted, select "Add Features."

  3. After this, click "Next" until you reach the Confirmation section. Confirm your selections and initiate the installation by clicking "Install."

GIF: Installing DHCP Server

Now that we have successfully installed the DHCP server tools, we must finish its setup by configuring it.



Configuring DHCP


To complete the Dynamic Host Configuration Protocol (DHCP) setup on your Windows server, we must configure it to use our Domain Controller (DC). These steps will guide you through the process of configuring DHCP.


Step 1: Accessing DHCP

After completing the installation, return to the Server Manager dashboard. Click "Tools" from the dropdown menu in the upper right corner and select "DHCP."

IMG: Accessing DHCP

Step 2: Initiate New Scope

Inside the DHCP application, locate your domain's dropdown. Right-click on "IPv4" and choose "New Scope." This action will launch the New Scope Setup Wizard. Click "Next" to proceed.

GIF: Initiate New Scope

Step 3: Define Scope Name

Enter a descriptive name for your scope on the Scope Name page in the "Name" field. For demonstration purposes, I'm using "Main LAN." After naming, click "Next."

IMG: Define Scope Name

Step 4: Specify IP Address Range

In this step, configure the IP range your DHCP server will use to allocate IP addresses. Define the range as:

  • Start IP address: 172.16.0.100

  • End IP address: 172.16.0.200

  • Length: 24

  • Subnet mask: 255.255.255.0

After setting the range, click "Next."

IMG: Specify IP Address Range

Step 5: Configure Exclusions (If Necessary)

This stage is for designating the IP addresses you want the DHCP server to omit. While exclusions aren't mandatory for our lab setup, in real-world scenarios, excluding addresses for servers, printers, and network storage devices ensures no unintentional assignments and potential IP conflicts. If you have no exclusions, click "Next."

IMG: Configure Exclusions

Step 6: Determine Lease Duration

Here, we can set the time frame for how long an IP address is assigned to a device. Think of it as an expiration time for the address on the network. The default lease is eight days, which is suitable for our lab. Adjust according to your needs and click "Next."

IMG: Determine Lease Duration

Step 7: Configure DHCP Additional Options

Here, we tell clients which DNS server to use. As our domain controller is configured with NAT, its IP address will serve as the default gateway. Select "Yes, I want to configure these options now," and click "Next." On the following page, input the domain controller's IP address (172.16.0.1), Select "Add," then proceed by clicking "Next."

GIF: Configure DHCP Additional Options

Step 8: Set Domain Name & DNS Servers

To leverage our domain controller as the DNS server, verify that its IP (172.16.0.1) is visible under IP addresses. Confirm by clicking "Next."

IMG: Set Domain Name & DNS Servers

Step 9: Skip WINS Server

Jason Gerend (2012), a contributor at Microsoft, explains that the Windows Internet Name Service (WINS) is an outdated system used to translate computer NetBIOS names into IP addresses. He suggests that if WINS has not already been incorporated into your network, it is advisable to use the Domain Name System (DNS) instead. DNS offers comparable name registration and resolution services to WINS but with added benefits like seamless integration with Active Directory Domain Services (Jason Gerend 2021).


For this reason, we will select "Next" to skip this page to continue using our DNS setup.

IMG: Skip WINS Server

Step 10: Activate and Finish Scope Configuration

To activate your scope immediately, choose "Yes, I want to activate this scope now." Finalize the settings by navigating "Next" and "Finish."

GIF: Activate and Finish Scope Configuration

Step 11: Finalize DHCP Server Authorization

Returning to the DHCP application, right-click the DHCP server and pick "Authorize." To see the changes in real-time, right-click again and hit "Refresh."

GIF: Finalize DHCP Server Authorization

Configuring a DHCP server may seem overwhelming if you need to familiarize yourself with network configurations. Nevertheless, each step is important, from defining the IP range to setting up the correct DNS and ensuring exclusions. A well-executed DHCP configuration will provide smooth networking for our employees' computers. While this guide serves our lab, it's important to adapt these steps to fit the individual needs of a real-world environment.



Verifying Router Setup in Server Options

Before we proceed, let's ensure our router setup from the previous section (specifically step 7) was successful. This setup is important for the ability to connect desktop computers to our corporate domain.


Here's how you can confirm:

  1. Navigate to the IPV4 drop-down.

  2. Click on the "Server Options" folder.

What you should see:

  • If the router setup was done correctly, you'll find it listed in the Server Options folder.

  • If not, your Server Options folder will appear empty.

IMG: Example of a Successful Router Configuration
Example of a Successful Router Configuration
IMG: Empty Server Options
Example of Empty Server Options

Didn't find the router listed? If the previous setup steps didn't add the router configuration and you see an empty Server Options folder, head to the "Configuring Server Options" section below for a step-by-step guide.

Configuring Server Options

  1. Right-click on the Server Options folder and select Configure Options...

  2. In the opened Server Options window, check the box labeled 003 Router.

  3. Input the IP address 172.16.0.1 into the IP address field, which corresponds to our DHCP server.

  4. Click Add, followed by Apply, to confirm and save the changes.

GIF: Setup Router Steps


Found the router? Great! If your router appears in the Server Options folder, you can skip the "Configuring Server Options" section and proceed to the next topic.



In this blog post, we have explored the detailed process of improving our network environment by setting up the Remote Access Server (RAS) and the Dynamic Host Configuration Protocol (DHCP). The RAS guarantees secure connectivity for our remote staff to our internal network. DHCP assigns unique IP addresses, promoting smooth communication within the network without any IP conflicts. Combining these two powerful tools has established a strong foundation for our company's digital infrastructure.


Now that we have completed these crucial server-side configurations, our next step is to optimize the client side. In our next post, we will discuss the process of configuring a Windows client for our employees, enabling them to connect to our established network environment and access resources necessary for their roles.



References

  • JasonGerend. 2021. “Windows Internet Name Service (WINS).” Microsoft Learn. July 29, 2021. https://learn.microsoft.com/en-us/windows-server/networking/technologies/wins/wins-top.



Comments


©2023 by Logan Toms. Proudly created with Wix.com

bottom of page