How to configure a DHCP server in Windows Server 2016
DHCP is a dynamic host configuration protocol that allows automating the configuration of client network parameters, such as IP address, gateway, DNS, subnet mask. The DHCP server controls the issuance of IP addresses, prevents duplication and frees unused addresses.
Below we’ll look at how to install and configure a DHCP server on Windows Server 2016 for a single subnet.
Installation process
- Launch Server Manager and select “Add roles and features”. Choose the first item "Role-based or feature-based installation":
- Specify the server on which we will install the DHCP role:
- Next, you need to find and select the DHCP role in the list. We agree to add the components required for the DHCP service to work properly. Since the components were added at the “Server Roles” step, we skip the “Features” step:
- The wizard reminds you to plan your subnets, areas, and exceptions:
- We check the installed components and click "Install":
- After the installation is complete, you can begin the initial configuration of DHCP. We follow the link "Complete DHCP configuration":
The initial setup process takes place in two stages:
1. Create a “Security Group” to manage this DHCP server. There are two of them:
- DHCP Administrators - group members have full rights to manage the DHCP server;
- DHCP Users - members of the group can view server settings and a list of connected devices.
2. Authorization of a DHCP server in Active Directory (if it is joined to a domain). This setting is necessary to avoid the appearance of extraneous DHCP servers on the network. The server must be authorized for the DHCP service to start:
- Enter the administrator credentials and click on the “Commit” button. If the server is not joined to the domain, then select the last item:
- If everything is done correctly, the wizard notifies that the configuration was successful:
Setup process
Launch the "Server Manager". We find the DHCP item in the "Tools" drop-down list:
In our version, we are considering issuing IPv4 addresses, so we need to create a new area (Scope) - a pool of IP addresses issued to clients. Right-click on IPv4 and select “New Scope ...”:
The Create Area Wizard opens, where we enter the name of the pool. If necessary, you can enter a description:
We determine the boundaries of our pool by setting the start and end IP addresses. Also, enter the subnet mask:
If necessary, you can add one or more IP addresses from the created pool to the exceptions. This range may include network devices that are already assigned a static IP. There is also a parameter for delaying the response of the server before sending data to the request from the host:
Next, you can specify the lease time of the IP address. The default is 8 days:
Now the Wizard will offer to specify the network parameters (Gateway, DNS, WINS) issued to clients on the network:
Specify the address of the network gateway:
Next, enter the domain name and DNS server. DNS can be found either by server name or by specifying an IP address:
The next step allows to add a WINS server:
Select "Activate" the area we specified now:
After setting up the pool, you can check if the server is working. You can see connected clients by going to the Address Leases section. In our case, we see that one device is connected:
If we go to the client machine, we can check the correctness of the received settings:
Although we considered the configuration on Windows Server 2016, this instruction is also suitable for Windows Server 2008-2012, since the process is not much different.