Installing DHCP Role in Windows Server 2012 R2

Dynamic Host Control Protocol or DHCP is a method of distributing IP address for hosts in the network. A host in the network will act as the DHCP server and will assign IP address for other hosts in the network who requests for IP address a.k.a the DHCP clients. Windows Server 2012 R2 can be configured as DHCP server. Just like any other roles, Installing DHCP Role in Windows Server 2012 R2 can be done using Server Manager or PowerShell.

Installing DHCP Role in Windows Server 2012 R2 using Server Manager

Using Server Manager is probably the easiest way to install any server role because of the wizard GUI that will help us understands the step by steps. To start installing DHCP Role in Windows Server 2012 R2 using the Server Manager, first you click on “Manage” and then select “Add Roles and Features”.

Installing DHCP Role in Windows Server 2012 R2 - 1

A window will appear as shown in the figure below. Click “Next” on this window.

Installing DHCP Role in Windows Server 2012 R2 - 2

Select “Role-based or feature-based installation” and click “Next” button again to continue.

Installing DHCP Role in Windows Server 2012 R2 - 3

Select the server where you want to install the role. In this example we’re installing it to the local server so we will just continue by clicking “Next” button again.

Installing DHCP Role in Windows Server 2012 R2 - 4

On the server roles selection, tick the box on “DHCP Server” and click “Next”.

Installing DHCP Role in Windows Server 2012 R2 - 5

Note that a pop-up window as shown below may appear when you tick the box on the “DHCP Server” option above. When it does, just ensure the “Include management tools” option is ticked an then click “Add Features

Installing DHCP Role in Windows Server 2012 R2 - 6

On the feature selection window, just click “Next” button again to continue.

Installing DHCP Role in Windows Server 2012 R2 - 7

Click “Next” again on the notice window.

Installing DHCP Role in Windows Server 2012 R2 - 8

Confirm all the settings and watch as the installation is progressing.

Installing DHCP Role in Windows Server 2012 R2 - 9

The installation of DHCP role does not require server restart so we can continue with the next task. If you’re installing DHCP role on a standalone server then you can start configuring DHCP scope as soon as the wizard completes the installation progress. But, if the server that you’re using is joined to an Active Directory domain, then you need to authorize it first.

Authorizing DHCP Server in Active Directory using Server Manager

If you don’t authorize the server in Active Directory, then it will not be able to distribute IP address for domain computers. In this example, the server that we’re using is joined to a domain named mustbegeek.com, therefore the Server Manager will show a notification to complete DHCP configuration. Just click on the link under that notification as shown below.

Installing DHCP Role in Windows Server 2012 R2 - 10

Click “Next” on the Description screen.

Installing DHCP Role in Windows Server 2012 R2 - 11

On the Authorization screen, select either to use the current user credential or use another credential. It requires domain account with sufficient privilege to authorize the DHCP Server in Active Directory. In this example we’re choosing to use the current logged on user credential. Click on the “Commit” button to proceed the authorization.

Installing DHCP Role in Windows Server 2012 R2 - 12

When the authorization process is success, the “creating security groups” and “authorizing DHCP server” status are all shown as “Done” as in the figure below. Click “Close” to finish the step.

Installing DHCP Role in Windows Server 2012 R2 - 13

Lastly, restart the DHCP Server service through the services snap-in.

Installing DHCP Role in Windows Server 2012 R2 - 14

With this way you have successfully installed and authorized the DHCP Server in Active Directory.

Install and Authorize DHCP Server using PowerShell

As the alternative for wizard GUI, installing DHCP Server role in Windows Server 2012 R2 can also be done through PowerShell. Installation using PowerShell is much faster and requires less steps than using Server Manager.

The command to install DHCP Server role is:

Install-WindowsFeature -Name 'DHCP' -IncludeManagementTools

This one-liner command will be the only one you need to install a standalone DHCP server. Additionally, if the server is part of an Active Directory domain and you need to authorize it, you can also do it using PowerShell with the command below:

Add-DhcpServerInDC -DnsName [server_FQDN] -IPAddress [server_IP]

As for our example the command will be:

Add-DhcpServerInDC -DnsName as-app026.mustbegeek.com -IPAddress 192.168.0.26

Finally, if you also need to restart the DHCP Server service, you can also do it through PowerShell with the command:

Restart-service dhcpserver

And that’s all. With only three PowerShell command lines you already completed installing DHCP Server Role in Windows Server 2012 R2 as well as authorizing it in Active Directory.

The following two tabs change content below.
Arranda Saputra

Arranda Saputra

ITIL Certified, CCNA, CCDA, VCP6-DCV, MCSA Administering Windows Server 2012
I am IT practitioner in real life with specialization in network and server infrastructure. I have years of experience in design, analysis, operation, and optimization of infrastructure solutions for enterprise-scaled network. You can send me a message on LinkedIn or email to arranda.saputra@outlook.com for further inquiry regarding stuffs that I wrote or opportunity to collaborate in a project.
scroll to top