Microsoft DHCP Server is a networking feature that automatically assigns IP addresses to computers on the local network. In this tutorial, we will go into detail about how to manage it using Windows PowerShell and Group Policy Management Editor.
The “windows dhcp server management tool” is a great way to manage the Microsoft DHCP Server. In this tutorial, we will walk through the process of setting up and configuring a Windows DHCP Server.
Today is your fortunate day if you’ve ever wondered how basic network setup is maintained throughout your environment. You’ll learn how to connect to your Microsoft DHCP server and handle all of the common components, including Scopes of DHCP, rules, reservations, and leases!
This is a how-to guide. You’ll need the following items if you want to follow along step-by-step:
- In an Active Directory context, a Microsoft DHCP Server- This tutorial utilizes Windows Server 2019, however any server starting with 2008R2 would do. dc01.stevesherry.com is the name of the server.
- A member of the DHCP Administrators group or its counterpart in Active Directory.
Scopes of DHCP
At its simplest, a Microsoft DHCP server is a machine on a network that hands out IP addresses to clients. It ensures all clients receive IP addresses so they can communicate on the network. It does this through Scopes of DHCP.
A DHCP scope has many components, including:
- IP addresses that may be assigned to a specific set of devices (address pools)
- DNS server and default gateway for a client
- IP addresses should only be assigned to certain devices (Reservations for DHCP)
- Pools of addresses (groups of assignable IP addresses)
A network’s DHCP scope is a key component that enables you to establish network parameters that apply to all clients on the network.
Using Server Manager to create a DHCP scope
Let’s kick off this tutorial by learning how to add Scopes of DHCP to an existing DHCP server. For this first demo, you’re going to learn how to set up a DHCP scope via the Windows Server Manager.
Assume you’re on a test DHCP server’s Windows desktop:
To launch the DHCP Microsoft Management Console, go to your Start menu and enter dhcpmgmt.msc (MMC).
2. When the DHCP MMC appears, choose IPV4 from the menu to the left of the server name.
The Microsoft DHCP Server may assign IPv4 and IPv6 addresses to clients. Only IPv4 scopes will be covered in this course.
Expand the DHCP server options to view IPv4 addresses.
3. To start the New Scope Wizard, right-click on IPv4 and choose New Scope, then click Next on the introduction page.
Begin the process of generating a new IPv4 DHCP scope.
4. Fill in the Name and Description fields with a name of your choosing. This article will let you make a scope for your company’s headquarters. When you’re finished, click Next.
Physical structures or IP subnets are often allocated scopes.
Create the scope’s name and description.
5. Next, create an IP Address Range that specifies the IP address range that the DHCP server’s clients will have. The lesson will guarantee that customers’ initial IP address is 10.0.0.100 and their final IP address is 10.0.0.200. The scope’s address pool is created by these start and finish IP addresses, as you’ll see later.
Enter a CIDR Length or Subnet Mask that will be assigned to all clients on this page as well.
Set up an IP Address Range
To allow for any statically allocated addresses, it’s typical to leave the beginning and end of the address pool open.
6. To skip the Add Exclusions and Delay step, click Next.
Exclusions and delays in DHCP
An exclusion prohibits the DHCP server from trying to allocate a specific IP address in its address pool if you know of one or more IP addresses that are already in use within the stated address range.
7. For now, accept the preset Lease Duration by clicking Next. Later in this course, you’ll learn a lot about Leases for DHCP.
Choose the length of the lease.
8. Keep the default value of Yes, I’d want to set these choices right now, therefore go to the next step, Configure DHCP Options. In this lesson, you will set several scope parameters.
While configuring the DHCP scope, configure DHCP options.
9. Next, give the Router an IP address of 10.0.0.1. (Default Gateway). The DHCP server will assign this IP address to clients as their default gateway once the DHCP scope is ready. Clients connect with other networks or the Internet in general via the default gateway.
Provide information about the default gateway.
10. Provide the IP address on the Domain name and DNS Servers step since this tutorial is utilizing an environment with a DNS server at 10.0.0.10. This IP address will be used by DNS clients to transform names into IP addresses for DHCP clients.
The Parent domain should fill automatically depending on the Active Directory domain that the DHCP server belongs to.
Set up your DNS server information.
11. If you still use a WINS server in your environment, enter its IP address in the WINS Server step. Because one is not used in this lesson, click Next to proceed.
Do You Still Require a WINS Server?
In the DHCP scope settings, add a WINS server.
12. Finally, choose Yes, I want to activate this scope immediately to activate the new DHCP scope and make it accessible to clients. Then, to proceed, click Next.
Turn on the DHCP scope.
After you’ve completed all of the procedures above, you should notice the new scope under IPv4 as seen below.
Check out the updated DHCP scope.
Using PowerShell to Create a DHCP Scope
If you don’t like the GUI or just need to automate DHCP chores, PowerShell is the way to go. Let’s go through the identical procedure as before, but this time using PowerShell instead of the Server Manager.
Assume you’re on a test DHCP server’s Windows desktop:
1. Log in as an administrator to Windows PowerShell.
2. Run the Get-DhcpServerv4Scope cmdlet to find all existing Scopes of DHCP.
This server only has the scope that you built using the GUI in the preceding stages, as you can see in the sample below.
Use PowerShell to report all of the available Scopes of DHCP on the server
3. To build a new DHCP scope, use the Add-DhcpServerv4Scope cmdlet. Because this cmdlet has a lot of arguments, you may save time by specifying each one in a PowerShell hashtable and passing all of them to the cmdlet via splatting.
This cmdlet will establish a DHCP scope named Head Office Wireless Scope that, when enabled, will assign IP addresses 10.1.0.100–10.1.0.200 with a subnet mask of 255.255.255.0 and a one-day lease (day.hrs:mins:secs).
Scope $HashArgs = @ Create an IPv4 DHCP Server ‘Name’ =’Head Office Wireless Scope’; # This is the name of the wireless scope ‘Description’ =’Wireless Clients’; # This is the human-readable description of the scope ‘StartRange’ =’10.1.0.100′; # Specifies the starting IP address in the scope ‘EndRange’ =’10.1.0.200′; # Specifies the end IP address in the scope ‘SubnetMask’ =’255 @HashArgs Add-DhcpServerv4Scope
4. Verify that PowerShell successfully built the DHCP scope by running Get-DhcpServerv4Scope again.
Using the Format-List to pipe output Instead of a truncated row, the PowerShell cmdlet displays each property name and value.
Verify that the DHCP scope has been installed.
Managing Scope Alternatives
After you’ve built a scope, you may change any attribute. Scope Options is a section of Microsoft DHCP that enables you to adjust several typical DHCP properties supplied to DHCP clients.
Let’s go through the various scope choices and how they will influence your customers.
During your time in the DHCP MMC:
- Click on Scope Options under <server name> —> IPv4 —> Scope [X.X.X.X]. In the screenshot below, you can see the scope previously created. Here you can see the Router, DNS Servers, and DNS Domain Name that this scope will hand out to DHCP clients.
Examining DHCP Scope Options
2. To update these choices, right-click on Scope Options and choose Configure Options from the context menu.
Set up a new DHCP option.
3. Under the General tab, scroll down to see the available settings. You’ll see that the DHCP server may assign hundreds of choices to clients.
If you require a setting that isn’t accessible by default, you’ll need to use the Advanced tab to build a custom Option by following the vendor’s instructions.
Consider the new DHCP Scope Options.
4. Perhaps one of your DNS servers was left out. Find the 006 DNS Servers option, type in its IP address, and click Add. The IP address 10.0.0.5 will be used in this tutorial.
DHCP Options: Add a new DNS Server
After you click OK, Windows will check to see whether DNS services are accessible on the IP address you specified.
Setting up a new DNS Server
5. Go back to the main screen and go through the Options pane again. Under 006 DNS Servers, you’ll now notice two IP addresses.
Ensure the DNS Server Option is enabled.
Leases for DHCP
The lease is a crucial aspect of DHCP. A device may “rent” an IP address from a DHCP server for a certain amount of time (lease time).
DHCP servers are often configured by network managers to lease IP addresses depending on various use cases. Administrators may grant a longer lease duration, such as eight days, to devices on a wired connection that seldom leave the network. Going through the lease renewal procedure is inefficient if the device never leaves the network.
Administrators may grant a shorter lease duration (12-24 hours) to a wireless device that roams on and off the network multiple times each week to conserve available IP addresses for other devices.
While in the DHCP console, you can find all current leases in <server name> —> IPv4 —> Scope [X.X.X.X] —> Address Leases as shown below.
The Address Leases pane displays each IP address issued by the DHCP server, as well as the Lease Expiration date.
DHCP Address Lease Management
Microsoft DHCP Lease Period Configuration
Let’s look at how to set the DHCP lease duration for DHCP clients at the server level.
While still in the DHCP server’s DHCP console:
1. Right-click on the scope name that contains the IP address pool you want to examine and choose Properties.
The characteristics of your DHCP Scope are shown.
2. A Lease duration for DHCP clients is now shown in the Properties pane. The DHCP lease period for all IP addresses in that scope is specified by this option.
On Microsoft DHCP servers, the default DHCP lease length is eight days, although it may be changed to meet the business requirements.
Display the attributes and duration of the DHCP Lease.
3. To close the Properties window, click Cancel.
Finding DHCP Lease Times that Have Been Assigned
Per device, DHCP services can only assign one IP address. How does the DHCP server know when an IP address in the pool may be reused? The duration of a DHCP lease.
If a device fails to renew its dynamically allocated IP address within the lease period, the lease ends and the address becomes available for lease to other devices.
How can you figure out how long a gadget has been rented? Unfortunately, each operating system (OS) exposes the DHCP lease time in a different method. This guide will show you how to calculate the lease time on Windows 10.
You may check your DHCP lease time on the command line in Windows 10 using either the command prompt (cmd.exe) or PowerShell. Let’s utilize PowerShell since this lesson presume you’re an IT specialist.
Related:How to Get an IP Address with PowerShell
Open Windows PowerShell and execute the ipconfig /all command on the Windows client console to get the lease time of a Windows DHCP client.
Related:Ipconfig Commands You Should Know
Time leased from Windows 10
You’ll see when the lease was signed (Lease Signed) and when it ends (Lease Expiration) (Lease Expires). The Lease Obtained field indicates when the DHCP server provided this device an IP address. The Lease Expires parameter specifies when the device will request a lease renewal from the DHCP server.
You may calculate your DHCP lease period by subtracting the Lease Expires value from the Lease Obtained value.
Pools of DHCP Addresses
You already have an address pool after configuring the scope. In a lease, the address pool is the set of IP addresses that the DHCP server will issue to customers. Let’s have a look at the address pool that has already been created.
The Address Pool is being updated.
The scopes of IP addresses are not set in stone. It’s unavoidable that you’ll need to enlarge the address pool over time to accommodate additional devices connecting to your network. It’s generally quicker to enlarge an existing address pool rather than create a new one. To do so, first:
1. Right click on <server name> —> IPv4 —> Scope [X.X.X.X] and click on Properties to open the Scope Properties configuration wizard.
The DHCP address pool should be updated.
2. Update the fields to expand the range of IP addresses for your current address pool, allowing for additional addresses to be allocated in the future. Click OK when you’re finished.
DHCP address pool expansion
3. Click on <server name> —> IPv4 —> Scope [X.X.X.X] —> Address Pool to bring up the address pool. Notice below that it now shows the expanded Address Pool in the scope.
Validate the new DHCP pool.
Excluding Address Ranges from the Address Pool
Consider the situation when you need to generate a short list of IP addresses in the address pool that aren’t allocated to any new network devices. This may be accomplished using exclusion ranges.
Assuming that the DHCP console is still open:
1. Click on <server name> —> IPv4 —> Scope [X.X.X.X] —> Address Pool to bring up the address pool.
Examine the Address Book
2. To launch the Add Exclusion wizard, right-click on Address Pool and choose New Exclusion Range.
To your DHCP address pool, add a new exclusion range.
3. Fill in the blanks to generate a narrow range of IP addresses that will not be included in any future lease allocations from your current address pool. After that, click Add.
Add the IP addresses that should be blocked.
4. Return to the DHCP console and refresh the screen to see the exclusion in place.
Verify that the addresses are no longer in the DHCP scope.
Your DHCP server will no longer lease an address from this exclusion range whenever a new device joins to the network.
Reservations for DHCP
IP addresses are dynamic by definition. This is usually OK since you don’t worry about your computer’s IP address. You may need to explicitly provide the address of a device, such as an admin laptop or a printer, from time to time.
Use a DHCP reservation when you need to allocate an IP address to a specific device statically.
Let’s begin by adding a reservation to a scope that has already been established. While in the DHCP server’s DHCP console:
1. Select <server name> —> IPv4 —> Scope [X.X.X.X] —> Reservations to open the Reservations window. You’ll see no reservations exist.
Managing Reservations for DHCP
2. To open the New Reservation input box, right-click on Reservations and choose New Reservation.
Establishing a fresh DHCP Reservation
3. Fill in the areas with information about the equipment to which you want to allocate a “static” IP address.
- The Reservation name is typically used as a device’s hostname or other identifying property.
- The device’s IP address should be reserved.
- The device’s MAC address.
Find a device’s MAC address by looking at the label on the back or utilizing these ways.
- Make sure the description makes sense to other administrators so they know what this reservation is for.
After that, click Add.
A New Reservation’s Information
4. Refresh the screen on the DHCP console and notice that the reservation is now active.
Examine the New DHCP Reservation System
When the device with the MAC address you supplied in the reservation completes its DHCP lifetime, it will be allocated the reserved IP address you specified.
As part of the general lifecycle of devices within your organization, you’ll occasionally have to retire old devices, some of which will have Reservations for DHCP.
If you’re still in the DHCP console, you may delete a DHCP reservation by right-clicking on it and selecting Delete.
DHCP Reservation Removal
Policies for DHCP
You already learnt how to make reservations using your MAC address. Reservations are helpful, but they don’t let you give addresses or special scope choices depending on other factors. You may establish several requirements that a client must follow in order to get an IP address using a DHCP policy.
You may designate a different DNS server, default gateway, or TFTP server to a particular category of devices using DHCP policies.
Create a DHCP policy like follows:
1. Right click <server name> —> IPv4 —> Scope [X.X.X.X] —> Policies and click on New Policy to open the Policy configuration window.
Make a fresh DHCP policy.
2. Fill in the blanks with the Policy Name and a Description for the policy. Once you’ve finished, click Next.
Wizard for creating DHCP Policies
3. Select Criteria from the dropdown menu to see the many criteria you may check for on a customer. Select MAC Address and enter a suitable Value using Wildcard for this instruction. To proceed, click Add and then OK.
Add a DHCP policy condition.
4. Click Next to continue or Add another condition for the insurance.
Combine many factors
5. After that, add a subset of IP addresses from your current range. The DHCP server will assign an IP address from this range to devices that meet the criteria stated previously. After that, click Next.
Set up a selection of IP addresses.
6. Next, specify the alternatives that the client will get if the condition is met. Select 003 Router for this lesson to change the default gateway that clients matching the requirement will obtain.
For the new gateway, enter an IP address, click Add, and then Next.
Configure the policy’s settings.
7. Review the screen and double-check that the information is right. To exit the wizard, click Finish.
Check out the updated setup.
8. Refresh the page to ensure the updated policy is in effect.
Ascertain that the new policy is in place.
In this article, you’ve covered a lot of ground when it comes to DHCP. You’ve learned how to set up Scopes of DHCP and everything that comes with them. You also learned how DHCP assigns IP addresses and other information to clients.
With all of your new knowledge, you can boldly take on DHCP as a champion. What are your plans for putting this information to use?
The “how to create dhcp scope in windows server 2016” is a tutorial that will teach you how to manage a Microsoft DHCP Server. The process is detailed and easy to follow.
- how to configure dhcp server in windows 2012 server step by step pdf
- server 2019 dhcp setup
- how to manage dhcp server
- how to open dhcp server
- windows test dhcp server