DHCP (Dynamic Host Configuration Protocol) is a network protocol that enables a server to automatically assign an IP address to a computer from a defined range of IP addresses.
This tutorial we will be adding the DHCP role to our Windows Server 2012 domain environment using the DHCP role.
Windows Server 2012 DHCP Server Role
Scenario
We are setting up a new office and need to configure a DHCP server to hand out IP addresses to DHCP enabled devices:
- Computers
- Printers
- Smartphones
- Switches
- Laptops
- Tablets
- and so on…
Steps to Complete
There are essentially three steps needed to successfully setup a DHCP server:
- Add the DHCP Role
- Configure a new scope and scope options
- Authorize the DHCP Server
Add the DHCP Role
First thing we need to do is add the DHCP Role to the server.
From within Server Manager, select Add roles and features.
Select Role-based of featured-based installation and select Next.
On the Server Selection window, leave the default and select Next.
The Server Roles window, select DHCP. Select Add Features in the pop-up window, then select Next.
On the Features section, leave the defaults and select Next.
Select Next on the DHCP Server window.
Confirm the settings and changes on the Confirmation window, and select Install.
After a couple of minutes, you should have your DHCP server role installed. You might be required to restart the server after the installation.
Configure DHCP Scope and Scope Options
Just because we have the role installed doesn’t mean we are done. We now need to configure the scope options.
From the Server Manager window, select Tools and then DHCP to bring up the mmc.
Now let’s create a new scope by right-clicking on IPv4 and selecting New Scope.
Click Next in the New Scope Wizard winodw.
Give your scope a name. This comes in handy if you assign different VLANs to different geographical locations (or whatever reason).
For this tutorial, we will just name it notcreative scope. Then click Next.
Now we need to tell this DHCP server what range of IP addresses we want it to hand out to DHCP clients.
For this tutorial, we will be handing out IP addresses in the range of 192.168.1.50 – 192.168.1.150
Fill in the Start and End range, then select Next.
If you have any IP addresses within the scope range that you want/need to exclude, enter them in the Add Exclusions and Delay window, then select Next.
For the Lease Duration, leave the defaults and select Next.
The next window allows you to configure the scope options such as:
- The router (default gateway) we need to hand out
- The DNS and WINS server address we need to hand out
Select Yes, I want to configure these options now, and then select Next.
Input the router’s (Default Gateway) IP address, select Add, then select Next.
The next screen is where we input our DNS server IP address(es). For me, it was already auto filled in with my Windows Server 2012 IP address, which is correct, so select Next.
For WINS, input the same IP address, select Add, then select Next.
Select Yes, I want to activate this scope now, and select Next.
Then select Finish at the Completing the New Scope Wizard window.
Authorize DHCP Server
The final step is to authorize the server.
Right-click your FQDN and select Authorize.
Refresh the view by right-clicking your FQDN and selecting Refresh.
You should now see green check marks next to IPv4 and IPv6.
If you boot up a client that has DHCP enabled, you can see it within the Address Leases section.
Expand IPv4, then Scope, then click on Address Leases. You might have to right-click Adress Leases and select Refresh to see the changes.