Table of Contents

Summary

This article is about Dynamic Host Configuration Protocol (DHCP) is to assign network settings automatically to every workstation in the network by a central server rather than configuring them locally on each. A host configured to use DHCP is enabled to configure itself completely and automatically according to directions from the server.

Objective

Main Functionality of DHCP server is to provide clients auto IP Address, Subnet mask, DNS Address and Gateway Address whenever clients request in the network in auto-configure mode. This document provides information on How to install & Configure DHCP Server.

Installation Procedure

There are two methods of installation DHCP Server feature in the server manager.
  1. Install using PowerShell
  2. Role & Feature-based Installation

Install using PowerShell

DHCP role can be installed using the PowerShell. It is a command line interface for running command to perform the installation with minimal resources, the same installation which can be done in GUI based environment can be done in PowerShell.

Follow the below instructions. Click the Windows button, then Windows PowerShell folder and Windows PowerShell as shown in the diagram.



The other way to open PowerShell is to click Windows button, then Server Manager and from the Server Manager window click the tools and select Windows PowerShell.



Write down the command add-WindowsFeature –IncludeManagementTools dhcp This will install the DHCP role with the following output.


Install Using GUI

To install the DHCP role in a GUI environment using the following instructions.

To start installation first click the Windows button and then Server Manager.



OIn the Server Manager window click Dashboard and then click Add roles and features.



In the Add roles and features Wizard, click Next.



Note: Read out the information on the screen that is relevant to the installation of roles and windows sever requirements.

First Select the installation type as role-based or feature-based installation as shown in the following diagram then click on Next.



Select the server from the server pool on which you are going to install the role as shown in following window then click Next.



In next screen you can select multiple roles here we will Click on DHCP Server then a new window appears which show that required tools to be added click on Add Feature.



Click Next to go to next step.



Click Next.



First click on the checkbox. Restart the destination server automatically if required, then click Yes and in the last click Install to start the installation process.



When the feature installation succeeded message shown under the progress bar Then click on Close to exit from the wizard.



After installation of the DHCP role, the next section is configuration, how and what IP addresses range to use, which gateway router and DNS server may be used and for how much time it should be used. Now to open DHCP Console go to Window Button on the taskbar then click Server Manager.



In the server manager window Click on Tools then DHCP to open the DHCP configuration console.



DHCP scope has a valid range of IP addresses pool to be given to clients by leasing, the mac address reservation, exclusion and other scope option can be done. Further information is shared as follows with stepwise actions. In the DHCP console right click on IPV4 then click on New Scope…to create a new scope.



The new scope wizard helps you set up scope for distributing IP addresses to network computers in the network. To continue further Click Next.



Here we define the scope name that will identify the scope. First, enter the Name of the scope the click Next.



Enter the range of IP address that client will have assigned as in the following diagram. The Length and Subnet mask can be customized also according to requirements. Click Next.



If there is an IP address that comes in the range of IP address given in DHCP server can be excluded by adding the range of IP addresses. Click Next.



The lease duration specifies how long a client can use an IP address from this scope. The default is 8 days time for leasing one IP address, this time is customization. Set the lease duration time then click Next.



If you have some other options like DNS servers WiNS you can add it here by choosing Yes radio button. Then click Next.



Here we can specify the routers, default gateways to be distributed by this scope. Enter the IP address of the Router or Gateway by typing the IP address in a text box, then click the Add button.



Now the IP address is added now click Next to continue to next step.



Enter the DNS server IP addresses according to set up that we want our client to use. Then click Next.



If there is no DNS server in the network the WINS server can be used, which convert the NetBIOS computer name to IP address. Enter the WINS server IP addresses according to your setup. Then click Next.



After almost click Next.



The completing the new scope wizard show you have successfully completed the new wizard scope On successful configuration of scope click Finish.



The Scope is created and activated as well as shown in the following diagram.




DORA (Discover, Offer, Request Acknowledgment)

The process of obtaining automatic IP address on DHCP client.

  1. DHCPDiscover: whenever the computer turned on connected to LAN send a broadcast message and look for the DHCP server.
  2. DHCPOffer: when the DHCP server receives the Discover message, the DHCP server sends a broadcast message to the client that I have an offer(TCP/IP configuration) for you.
  3. DHCPRequest: when the client receives the offer broadcast then it sends a request that I am ready to accept the offer (TCP/IP configuration).
  4. DHCPACK: the request is entertained by DHCP server and sends an acknowledgment broadcast that you got it (TCP/IP configuration) but it will be with lease duration. The default lease duration is 8 days when 50% of the time is consumed the DHCP client request DHCP server unicast the to renew the lease duration.
Further readings:-https://docs.microsoft.com/en-us/windows-server/networking/technologies/dhcp/dhcp-top