Windows Server 2016 – Creating a DHCP scope to assign addresses to computers

Docker Compose Tutorial for Beginners

In the Configuring a combination Domain Controller, DNS server, and DHCP server recipes, we installed the DHCP role onto a server called DC1. Without some configuration, however, that role isn’t doing anything. In most companies that I work with, all of the servers have statically assigned IP addresses, which are IPs entered by hand into the NIC properties. This way, those servers always retain the same IP address. But what about client machines that might move around, or even move in and out of the network? DHCP is a mechanism that the clients can reach out to in order to obtain IP addressing information for the network that they are currently plugged into.

This way, users or admins don’t have to worry about configuring IP settings on the client machine, as they are configured automatically by the DHCP server. In order for our DHCP server to hand out IP addresses, we need to configure a scope.

Getting ready

We have a Server 2016 machine online with the DHCP role installed. We will also be testing using a Windows 10 client machine to ensure that it is able to acquire IP address information properly from the server.

How to do it…

Perform the following steps to create and configure a DHCP scope to assign addresses to client computers:

  1. Drop down the Tools menu inside Server Manager, then click on DHCP. This opens the DHCP management console.
  2. Expand the left-hand pane, where the name of your DHCP server is listed. You will see sections for IPv4 and IPv6. For our network, we are sticking with IPv4, so we right-click on that and choose the option for New Scope…:
  1. Start the New Scope Wizard screen by creating a name for your scope. This can be anything you like.
  2. Enter a range of IP addresses that you would like the DHCP server to hand out to computers. The Subnet mask field will likely populate automatically; just double-check to make sure it is accurate:
  1. On the Add Exclusions and Delay screen, if there are any IP addresses within the scope you just defined that you do not want handed out, specify them here. For example, if you are going to use .50 through .99, but you already have a print server running on .75, you could exclude .75 on this screen so that DHCP doesn’t try to hand out the .75 address to a client computer.
  2. Now set a time in your Lease Duration field. This is the amount of time in between DHCP refreshes for a client computer. If a particular computer leaves the network and comes back within its lease duration, it will be given the same IP address that it had last time. If you’re not sure about this one, leave it set at the default and you can adjust it later.
  3. Next, we will populate the rest of the IP information that the client computers need to receive on our network. Fill out fields for Router (Default Gateway), Domain Name and DNS Servers, and WINS Servers, if necessary.
  4. The last item to choose is Yes, I want to activate this scope now. We’re in business!
  5. As a quick test, let’s boot a client computer onto this network whose NIC has not been configured with a static IP. If we take a look at its IP configuration, we can see that it has successfully received IP addressing information from our DHCP server automatically:

How it works…

DHCP is one of the core infrastructure roles that almost everyone uses inside their networks. While we have only scratched the surface here of what DHCP is capable of, the ability to automatically hand out IP addresses to connecting client computers is DHCP’s core functionality. Installing the role and creating a scope are our primary steps to make use of DHCP. Take a look at our next recipe for one of the advanced functions that can be accomplished within your scope.

Comments are closed.