Introduction
In this section, we will explore the what, who, where, when, why, and how of DHCP Server functionality on the Windows Server 2019 platform, so let's get started
Overview
What
A DHCP (Dynamic Host Configuration Protocol) Server is a network server that automatically assigns IP addresses and other network configuration parameters to devices on a network, allowing them to communicate efficiently.
Who
DHCP Servers are used by network administrators and IT professionals to manage and simplify the process of IP address assignment in various organizational networks, including businesses, schools, and data centers.
Where
DHCP Servers are deployed in local area networks (LANs), wide area networks (WANs), and within data centers. They serve both wired and wireless networks to ensure all devices can connect and communicate efficiently.
When
DHCP Servers are constantly in use, operating 24/7 to manage IP address assignments and other network configurations. They are particularly critical during device startup and when devices move between networks.
Why
Using a DHCP Server offers several advantages and some costs. Here’s a detailed comparison:
Pros | Costs |
---|---|
Automates the IP address assignment process, reducing manual configuration efforts. | Initial setup and configuration can be complex. |
Ensures accurate and conflict-free IP address management. | Requires ongoing maintenance and monitoring. |
Enhances network security by centralizing control over network configuration. | Potential single point of failure if the DHCP Server goes down. |
How
The DHCP Server works through the following process:
Discover | A device sends a broadcast message to find available DHCP Servers. |
Offer | DHCP Servers respond with an offer message containing IP address information. |
Request | The device requests an IP address from the chosen DHCP Server. |
Acknowledge | The DHCP Server sends an acknowledgment message, confirming the IP address assignment. |
Consequences
Positive |
|
Negative |
|
Conclusion
A DHCP Server is a vital component in modern networks, automating the process of IP address assignment and network configuration. It simplifies network management, enhances security, and reduces manual efforts. However, it requires proper setup, monitoring, and maintenance to ensure its effectiveness and reliability.
Install DHCP Server
Install DHCP ( Dynamic Host Configuration Protocol ) Server.
Using Command Line Interface (CLI)
Run PowerShell with Admin Privilege and Configure like follows.
Step [1]Install DHCP Server.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
# install DHCP with admin tools
PS C:\Users\Administrator> Install-WindowsFeature DHCP -IncludeManagementTools
Success Restart Needed Exit Code Feature Result
------- -------------- --------- --------------
True Yes SuccessRest... {DHCP Server, ...
WARNING: You must restart this server to finish the installation process.
# restart computer to apply changes
PS C:\Users\Administrator> Restart-Computer -Force
Using Graphical User Interface (GUI)
On GUI configuration, set like follows.
Step [2]Run Server Manager and Click [Add roles and features].
Step [3]Click [Next] button.
Step [4]Select [Role-based or feature-based installation].
Step [5]Select a Host which you'd like to add services.
Step [6]Check a box [DHCP Server].
Step [7]Addtional features are required to add DHCP Server. Click [Add Features] button and next, Click [Next] button.
Step [8]Click [Next] button.
Step [9]Click [Next] button.
Step [10]Click [Install] button.
Step [11]After finishing Installation, click [Close] button.
Configure DHCP Server
Configure installed DHCP Server. On this example, it shows only the case for IPv4 configuration. By the way, if your Server to install DHCP is stand-alone Server, it's OK to logon to configure with local Administrator account, but if your Server is in Active Directory Domain, Authorization from AD is required to configure DHCP Server as valid Server, so logon to configure with a user that is AD Domain user in Domain Admin group.
Using Command Line Interface (CLI)
Run PowerShell with Admin Privilege and Configure like follows.
Step [1]Configuring DHCP Server.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
# add security group for DHCP
PS C:\Users\Bizantum> Add-DhcpServerSecurityGroup -ComputerName "RX-7.bizantum.local"
# if computer is in AD domain, run the command below to get authorization from AD
PS C:\Users\Bizantum> Add-DhcpServerInDC -DnsName "RX-7.bizantum.local" -IPAddress 10.0.0.101 -PassThru
IPAddress DnsName
--------- -------
10.0.0.101 rx-7.bizantum.local
# add a Scope for IPv4
# [-Name] ⇒ any name you like
# [-StartRange] ⇒ start IP address for lease
# [-EndRange] ⇒ end IP address for lease
# [-LeaseDuration] ⇒ lease period [day.hrs:mins:secs] (if not specified, default is 8 days)
PS C:\Users\Bizantum> Add-DhcpServerv4Scope -Name "Internal Network" `
-StartRange 10.0.0.200 `
-EndRange 10.0.0.254 `
-SubnetMask 255.255.255.0 `
-LeaseDuration 8.00:00:00 `
-State Active `
-PassThru
ScopeId SubnetMask Name State StartRange EndRange LeaseDuration
------- ---------- ---- ----- ---------- -------- -------------
10.0.0.0 255.255.255.0 Internal Ne... Active 10.0.0.200 10.0.0.254 8.00:00:00
# set Domain Name, DNS Server, Gateway(Router) to the Scope
PS C:\Users\Bizantum> Set-DhcpServerv4OptionValue -DnsDomain "bizantum.local" `
-DnsServer "10.0.0.100" `
-Router "10.0.0.1" `
-ScopeId "10.0.0.0" `
-PassThru
OptionId Name Type Value VendorClass UserClass PolicyName
-------- ---- ---- ----- ----------- --------- ----------
15 DNS Domain Name String {bizantum.local}
3 Router IPv4Add... {10.0.0.1}
6 DNS Server IPv4Add... {10.0.0.100}
PS C:\Users\Bizantum> Restart-Service DHCPServer
WARNING: Waiting for service 'DHCP Server (DHCPServer)' to start...
Using Graphical User Interface (GUI)
On GUI configuration, set like follows.
Step [2]Run Server Manager and Click [DHCP] on the left menu and next, Click [More...] link which is upper-right.
Step [3]Click [Complete DHCP configuration] link which is upper-right.
Step [4]Click [Next] button.
Step [5]If your Server is Stand-Alone Server, select [Skip AD authorization] and Click [Commit] button. If your Server is in AD Domain, though current user is set automatically for AD authorization but if you'd like to change it, set a user for AD authorization and Click [Commit] button.
Step [6]After successing authorization normally, click [Close] button.
Step [7]Back to Server Manager and open [Tools] - [DHCP].
Step [8]Right-Click [IPv4] on the left pane and select [New Scope...].
Step [9]Click [Next] button.
Step [10]Input any name and decsription for this scope.
Step [11]Input IP address range for lease and subnet mask.
Step [12]If you'd like to exclude specific IP addresses from the range set in previous section, Configure it on here.
Step [13]Input lease duration.
Step [14]Click [Next] button.
Step [15]Input default gateway of your network.
Step [16]Input Domain name and DNS server of your network. If your Server is in AD Domain, it set automatically, make sure it and proceed next.
Step [17]Input WINS Server. It's OK to keep empty here if you don't need it.
Step [18]Click [Next] button.
Step [19]Click [Finish] button to complete configuration.
Step [20]New DHCP Scope has been added.
Configure DHCP Client
Configure DHCP Client. This example is based on Windows 10. On this example, it shows only the case for IPv4 configuration.
Step [1]Open Network settings and then, select [TCP/IPv4] and click [Properties] button.
Step [2]Set like follows to assign IP address from DHCP server.
Step [3]After re-configuration of networking, IP address is assigned from DHCP Server.
- Get link
- X
- Other Apps
Comments
Post a Comment
Thank you for your comment! We appreciate your feedback, feel free to check out more of our articles.
Best regards, Bizantum Blog Team.