Lab 4.3 - DHCP
Lab 4.3 - DHCP
Lab 4.3 - DHCP
Instructions
Lab Information
This lab's setup information can be found in the Lap Setup Information folder in the Start Here!
Folder in the Content section of Brightspace. Always check this document for the information
and setup of the lab.
Introduction
Dynamic Host Configuration Protocol (DHCP) enables a Windows Server 2019\2022 server
with DHCP services to detect the presence of a new workstation and assign an IP address to
that workstation. This capability enables a network or server administrator to save hours of
time by not having to keep track of IP addresses on a network and assign specific addresses
to users and network devices.
A Windows Server 2019\2022 server can be configured in the role of a DHCP server using
Microsoft DHCP services. When you set up a Microsoft DHCP server, you can set it up to
automatically register forward and reverse lookup zone records with a Microsoft DNS server.
The DHCP server automatically updates the DNS server when it assigns an IP address. Using
dynamic DNS updates can significantly save time in creating DNS lookup zone records.
Further, a Microsoft DHCP server can be configured to dynamically register only address (A or
AAAA) records—in cases where the DNS reverse lookup zone is not configured in DNS—or
both address and PTR records.
• Reserve an IP address for a specific computer, such as for a server (servers should
always use the same IP address to avoid network confusion).
• Update all computers on a network for a particular change in DHCP settings, which
eliminates the need to manually update the computers.
• Provide DHCP services to multiple subnetworks (subnets), as long as routers can
forward DHCP requests (routers should be compatible with RFCs 1541 and 1542,
specifications that affect routing DHCP).
• Exclude certain IP addresses from a scope, so that these addresses can be used
manually or statically set up on a particular computer or device, such as a server or
network printer.
Importantly, you can configure DHCP failover for redundancy. DHCP failover consists of
configuring two DHCP servers to lease IP addresses using the same subnet or scope. DHCP
data is replicated between the two DHCP servers so that if one goes down, clients can still use
the remaining live DHCP server. When you configure two DHCP servers for failover, you can
also configure to use load-balancing so the two DHCP servers equalize the load, giving faster
service to clients. Multiple scopes are supported in a single Microsoft DHCP server because it
is often necessary to assign different address ranges. You can accomplish this by creating two
scopes, such as one range that is 192.168.10.1 to 192.168.10.122 and another that is
192.168.20.10 to 192.168.20.182. As this example illustrates, you can assign address ranges
to reflect the network subnet structure or other network divisions. Alternatively, to consolidate
management of scopes you can create one scope using the combined range of 192.168.10.1
to 192.168.20.182, and then exclude a range of addresses from within the scope.
5. In the Select destination server window, ensure your server is selected and click Next.
6. Click the box for DHCP Server in the Select server roles window.
7. Click Add Features in the Add Roles and Features Wizard box (to install the DHCP
management tool). Leave Include management tools checked.
10. In the DHCP Server window read the information. Note the best practices advice to
configure at least one static IP address for the DHCP server and to create and store a
plan for subnets, scopes, and exclusions. Click Next.
11. Click Install in the Confirm installation selections window.
Second, authorize the DHCP server. The process of authorizing the server is a security
precaution to make sure IP addresses are only assigned by DHCP servers that are managed
by network and server administrators. The security is needed because it is critical for IP
address leasing to be carefully managed by ensuring that only valid IP addresses are used
and that there is no possibility that duplicate IP addresses can be leased. DHCP servers that
are not authorized are prevented from running on a network.
Third, a step that is not required but is highly recommended and saves time in managing DNS
is to configure the DHCP server and its clients to update DNS records automatically.
16. In the tree in the left pane of the DHCP window, double-click the name of the server
under DHCP, to view IPv4 and IPv6 listed under the server name.
17. In the left pane, click IPv4 to view the configuration information in the middle pane.
Right click IPv4 and click New Scope.
19. Enter a name for the scope so it is easy for you to identify as you maintain it, we will
use OSSE1091 Scope, and enter a description for the scope, we will use Primary
Scope. Click Next.
20. Enter the start and end IP addresses, 172.16.1.1 and 172.16.1.100 - To go from field to
field, press the period key (when you enter fewer than three numbers). Change the
subnet mask to 255.255.255.0 - Click Next. (Tip - a length of 24 is 255.255.255.0).
21. In the Add Exclusions and Delay window, enter an address range to exclude, Start IP
Address 172.16.1.1, End IP Address 172.16.1.49 and click Add.
22. Click Next.
25. Ensure that Yes, I want to configure these options now is selected and click Next.
26. The next dialog box offers the ability to enter an IP address for a router (default
gateway). Enter 172.16.1.1 and Click Next.
27. Enter the parent domain where DNS name resolution will occur, OSSE1091.priv (Your
domain should be entered by default). Enter the name of the DNS server and click
Resolve. You could also enter the DNS server’s IP address but entering the name and
resolving is a quick way to ensure your DNS forward lookup zone is working properly.
Click Add (unless the IP address is already displayed by default, then just click Next).
Check CAREFULLY (the address should be the DNS servers for your Domain)!
29. In the next dialog box, you can enter the names and IP addresses of WINS servers.
This would be used on networks that have old Windows Server computers in which
NetBIOS naming is used so that these names can be mapped to IP addresses. We are
not using any servers requiring WINS. Click Next. (If you see the WINS Servers dialog
box, click Next.)
30. Ensure that Yes, I want to activate this scope now is selected and then click Next.
35. Ensure the server in the left pane is expanded to show the elements under it.
38. Click the DNS tab (see Figure 8-20) and ensure the box for Enable DNS dynamic
updates according to the settings below is checked. Clients running Windows 7,
8/8.1, 10, 11, Server 2012/R2, Server 2016, Server 2019 and Server 2022 operating
systems can request to update a DNS server. Ensure Dynamically update DNS
records only if requested by the DHCP clients is selected. If older operating
systems are connecting to the network, such as Windows 98 or Windows 95, which do
not request to update a DNS server, click instead Always dynamically update DNS
records - which means that the DHCP server takes the responsibility to update the
DNS server’s records every time a client obtains the IP address. Also, ensure that
Discard A and PTR records when the lease is deleted are checked so that the
DHCP server alerts the DNS server to delete a record each time a lease is up. If some
older clients are running Windows 95, 98, and NT (unlikely but possible), check
Dynamically update DNS records for DHCP clients that do not request updates
(for example, clients running Windows NT 4.0).
39. Click OK.
41. Switch to your WIN10CLIENT, open PowerShell and issue ipconfig to verify you are
getting an IP address from your DHCP server. It should start after the excluded range
of IP addresses. You might need to use the /release and /renew switches.
42. Join your WIN10CLIENT to the domain and reboot it. Remember to use domain
credentials in this format when prompted: Domain\username or, in our case
OSSE1091\DOM-Admin or OSSE1091\ENT-Admin.
Task Fun - Installing the DHCP Role, creating a Scope and Authorizing the
DHCP Server using PowerShell
By now you should most likely expect your instructor to provide the “How To” for doing all the
above steps using just PowerShell. Luckily for you I will not disappoint you
If you want to try this you will need to delete the scope you created using the DHCP
Manager GUI.
46. Add the required DNS Server, Domain, and Router Gateway Options in DHCP.
Set-DhcpServerV4OptionValue -ScopeId 172.16.1.0 -DnsServer 172.16.1.20
-DnsDomain "OSSE1091.priv" -Router 172.16.1.1