Install and Configure DHCP Server on Windows Server 2012 R2

This article is for those looking for a detailed and straightforward guide on installing and configure DHCP Server on Windows Server 2012 R2.
IMPORTANTIn this guide, we will consider the case when you already have a server with the Windows Server 2012 R2 operating system installed on it.
For details on installing Windows Server 2012 R2, read my guide: Install Windows Server 2012 R2.
NOTETo learn how to install Active Directory Domain Services on Windows Server 2012 R2, read: Install Active Directory Domain Services on Windows Server 2012 R2.
IMPORTANTBefore starting the installation of the DHCP Server role, you must give the server the correct name in accordance with your organizationâs standards, and then specify a static IP address in the network connection settings. In addition, the server must be added to the domain.
In my guide Basic Setup of Windows Server 2012 R2 you can read about how to make basic Windows Server 2012 R2 settings and add a server to a domain.
We go into the system under an account with domain administrator rights.
Open the âServer Managerâ, click on the âManageâ button in the upper right corner of the screen and select âAdd Roles and Featuresâ.
Click on the âNextâ button.
Select the installation type âRole-based or feature-based installationâ and click on the âNextâ button.
Next, select the server on which the role will be installed.
Click on the âNextâ button.
We select the role âDHCP Serverâ.
In the next step, the âRole Installation Wizardâ will warn you that several components need to be installed to install the âDHCP Serverâ role.
Click on the âAdd Featuresâ button.
Click on the âNextâ button.
At the stage of adding components, we leave all the default values.
Click on the âNextâ button.
Next, the âRole Installation Wizardâ invites you to familiarize yourself with additional information regarding the âDHCP Serverâ role.
Click on the âNextâ button.
In order to start the installation of the selected role, click on the âInstallâ button.
The installation of the selected role and the components required for it has begun.
Installation of the DHCP Server role is complete.
Now click on the âComplete DHCP configurationâ button in order to configure the DHCP server.
You are notified that the next two local security groups will be created to control access to the DHCP server, and then the DHCP server will be authorized in Active Directory.
Click on the âNextâ button.
In the âUse the following userâs credentialsâ section, specify an account with domain administrator rights.
Click on the âCommitâ button.
In the âUse the following userâs credentialsâ section, specify an account with domain administrator rights.
Click on the âCloseâ button.
Return to the âRole Installation Wizardâ and click on the âCloseâ button.
Now you need to check that the two security groups were created successfully.
On the keyboard, press the key combination âWinâ and âxâ, then select âComputer Managementâ in the menu that opens.
Further in the section âLocal Users and Groupsâ we find âGroupsâ.
All local security groups are displayed on the right side of the screen. These should include the DHCP Administrators group, whose members have full access to DHCP management, and the DHCP Users group, whose members have access only to view DHCP settings.
Now letâs configure the DHCP server so that it distributes network settings (IP address, subnet mask, gateway, DNS) for all devices that will connect to the local network.
In Server Manager, click on the âToolsâ button in the upper right corner of the screen and select âDHCPâ.
Letâs specify the range of addresses from which the DHCP server will distribute IP addresses for devices on the local network.
Right-click on âIPv4â and select âNew Scopeâ in the menu that opens.
Click on the âNextâ button.
In the âNameâ field, specify the name for the new address range.
Click on the âNextâ button.
We indicate the subnet mask and the range of addresses from which the DHCP server will distribute IP addresses for devices on the local network.
Click on the âNextâ button.
Now you can specify a range for which the DHCP server will not distribute settings.
This can be useful if you know that there are servers, printers, or other devices in a certain range of addresses that have already been assigned a static IP address. In this case, you need to exclude this part of the range, since the IP addresses from it are already in use. You also need to exclude the IP address that is assigned to the gateway.
NOTETo exclude one IP address, it is enough to fill in only the âStart IP addressâ field.
Specify the part of the range to be excluded and click on the âAddâ button.
After the part of the range to be excluded is added, click on the âNextâ button.
Then you can choose for how long IP addresses will be leased to devices.
Leave the settings unchanged and click on the âNextâ button.
Now you need to specify the network settings (gateway, DNS) that the DHCP server will distribute to devices on the local network.
We select âYes, I want to configure these options nowâ.
In the âIP addressâ field, specify the IP address of your gateway and click on the âAddâ button.
After the IP address is added, click on the âNextâ button.
Next, in the âParent domainâ field, specify the domain name.
In the âIP addressâ field, specify the IP address of the DNS server.
Click on the âNextâ button.
NOTEThe WINS server is not used in this guide.
Click on the âNextâ button.
Now you need to activate the selected address range.
Select âYes, I want to activate this scope nowâ and click on the âNextâ button.
The DHCP server configuration is complete. Now all devices connected to the local network will receive network settings (IP address, subnet mask, gateway, DNS) and will be able to communicate with each other.
Click on the âFinishâ button.
Now you can reserve a specific IP address for a specific device so that the device is always given the same IP address.
In the âAddress Leasesâ section, you can see all devices and IP addresses that the devices received from your DHCP server.
In order to reserve an IP address for a device, in the âAddress Leasesâ section, right-click on one of the devices that has already received an IP address, and select âAdd to Reservationâ in the menu that opens.
The IP address obtained by it has been successfully reserved for the specified device.
Click on the âOKâ button.
You can also add a reservation manually by specifying the required IP address and MAC address of the deviceâs network card.
Right-click on the âReservationsâ section and select âNew Reservationâ.
In the âReservation nameâ field, specify the name of the device for which you want to make a reservation for the IP address.
In the âIP addressâ field, specify the IP address that must be reserved for the device.
In the âMAC addressâ field, specify the MAC address (Physical Address) of the deviceâs network card for which you want to make a reservation for the IP address.
NOTEIn fact, it is for the MAC address of the network card that the IP address is reserved. The MAC address on any device can be viewed in the properties of the network adapter. On Windows, you can run the
ipconfig /all
command at a command prompt to view the MAC address of a network adapter. On Linux, run theifconfig
command on the command line.
In the âSupported typesâ section, select âBothâ.
Click on the âAddâ button.
Reservation of the IP address for the specified MAC address of the device has been successfully added.
In the âReservationsâ section, you can see all devices for which IP addresses have been reserved.
The DHCP server database and logs can be found in the â%systemroot%\system32\dhcpâ directory. We recommend that you back up this directory.
- dhcp.mdb - DHCP server database file
- j50.log - Log of all database transactions. This file is used by the DHCP database to restore data in case of need
- j50.chk - Checkpoint file
- tmp.edb - DHCP server temporary working file
Patreon Exclusives
đ Join my Patreon and dive deep into the world of Docker and DevOps with exclusive content tailored for IT enthusiasts and professionals. As your experienced guide, I offer a range of membership tiers designed to suit everyone from newbies to IT experts.
Tools I Personally Trust
If youâre building things, breaking things, and trying to keep your digital life a little saner (like every good DevOps engineer), these are two tools that I trust and use daily:
đž Proton VPN - My shield on the internet. It keeps your Wi-Fi secure, hides your IP, and blocks those creepy trackers. Even if Iâm hacking away on free cafĂ© Wi-Fi, I know Iâm safe.
đ Proton Pass - My password vault. Proper on-device encryption, 2FA codes, logins, secrets - all mine and only mine. No compromises.
These are partner links - you wonât pay a cent more, but youâll be supporting DevOps Compass. Thanks a ton - it helps me keep this compass pointing the right way đ
Gear & Books I Trust
đ Essential DevOps books
đ„ïž Studio streaming & recording kit
đĄ Streaming starter kit
Social Channels
đŹ YouTube
đŠ X (Twitter)
đš Instagram
đ Mastodon
đ§” Threads
đž Facebook
đŠ Bluesky
đ„ TikTok
đ» LinkedIn
đŁ daily.dev Squad
âïž Telegram
đ GitHub
Community of IT Experts
đŸ Discord
Refill My Coffee Supplies
đ PayPal
đ Patreon
đ„€ BuyMeaCoffee
đȘ Ko-fi
đ GitHub
⥠Telegram Boost
đ Bitcoin (BTC): bc1q2fq0k2lvdythdrj4ep20metjwnjuf7wccpckxc
đč Ethereum (ETH): 0x76C936F9366Fad39769CA5285b0Af1d975adacB8
đȘ Binance Coin (BNB): bnb1xnn6gg63lr2dgufngfr0lkq39kz8qltjt2v2g6
đ Litecoin (LTC): LMGrhx8Jsx73h1pWY9FE8GB46nBytjvz8g
Is this content AI-generated?
No. Every article on this blog is written by me personally, drawing on decades of hands-on IT experience and a genuine passion for technology.
I use AI tools exclusively to help polish grammar and ensure my technical guidance is as clear as possible. However, the core ideas, strategic insights, and step-by-step solutions are entirely my own, born from real-world work.
Because of this human-and-AI partnership, some detection tools might flag this content. You can be confident, though, that the expertise is authentic. My goal is to share road-tested knowledge you can trust.