Chapter 4 - DHCP and DNS - Windows Server 2022
Chapter 4 - DHCP and DNS - Windows Server 2022
Chapter 4 - DHCP and DNS - Windows Server 2022
2
The purpose of DNS
In the world of networking, computers and devices identify and talk each
other over a network using numbers (e.g., IP address)
On the other hand, Humans are accustomed to using names
The purpose of DNS
To bridge the gap to make the communication a lot easier, DNS developed
DNS resolves names to numbers, i.e., domain names to IP addresses
Example
DNS
How DNS works
DNS
How DNS works
I don’t know
I’ll direct you to the TLD server
I don’t
know
DNS
How DNS works
DNS
A hierarchically distributed database
Root “.”
Resource
Record
.com
.edu
Resource
Record
DNS Servers
Root Hints
com
DNS Server
Client microsoft
DNS
The root name servers
.com
Nwtraders.com
Client Server
DNS
Infrastructure components
Primary zones
Responsible for maintaining all of the records for the DNS zone
It contains the primary copy of the DNS database
All record updates occur on the primary zone
Two types of primary zones:
o Primary zone: Local database (stored locally in a file on the server)
o Primary zone with Active Directory Integration (Active Directory DNS)
⁻ The DNS database is stored in Active Directory.
⁻ All Active Directory DNS servers can have access to the same data
⁻ It has to reside on a domain controller
DNS
Infrastructure components: DNS Database zones
Secondary zones
Noneditable copies of the DNS database
Used for load balancing
Gets its database from a primary zone
It can be used to resolve DNS requests
DNS
Infrastructure components: DNS Database zones
Stub zones
The database is a noneditable copy of a primary zone
Contains only the information necessary to identify the authoritative
DNS servers for a zone
Contain only three record types:
o name server (NS)
o start of authority (SOA)
o glue host (A).
DNS
Infrastructure components: zone transfers and replication
When configured for the first time, a new secondary server receives a full zone
transfer from the primary DNS server
After the secondary receives its first full zone transfer, subsequent zone transfers
are incremental.
Based on the difference of the zone version number between two servers, and the
primary sends only the changes that have been made in the interim
The secondary server typically initiates zone transfers when:
o The refresh interval time for the zone expires
o The secondary or stub server boots.
o The primary notifies the secondary whenever any changes to the zone database occur
DNS
Infrastructure components: zone transfers and replication
Not a zone type, but an option can be selected when create some types of
DNS zone
A checkbox that states Store the zone in Active Directory
The new zone stored inside Active Directory
Capable of being replicated automatically to all DC servers in your domain
DNS
Forward Lookup Zones and Reverse Lookup Zones
Field Meaning
Name The domain that will be serviced by this name server
Class Internet (IN)
Record Type Name server (NS)
Name Server The FQDN of the server responsible for the domain
DNS
Record Types: Service Record (SRV)
Windows client query DNS servers for the location of a domain controller
Service (SRV) records tie together the location of a service (like a domain
controller)
Format: domain TTL Class Record-Type Priority weight port-number target
Example:
ldap.tcp.example.com. 86400 IN SRV 10 100 389 hsv.example.com
ldap.tcp.example.com. 86400 IN SRV 20 100 389 msy.example.com
o Priority: Specifies a preference, SRV record with the lowest priority is used first (10).
o Weight: Service records with equal priority are chosen according to their weight (100)
o Port number: The port where the server is listening for this service (389).
o Target: The FQDN of the host computer
DNS
Record Types: Pointer Record (PTR)
Start Of
Authority
(SOA) record
DNS
Configuration: Setting Zone Properties
DNS provides the ability to divide the namespace into one or more Zones
A need to delegate management of part of the DNS namespace to another location
or department within the organization
Each newly delegated zone requires a primary DNS server just as a regular DNS
zone does
DNS
Configuration: Delegating Zones for DNS
DNS
Configuration: Delegating Zones for DNS
DNS
Creating Records: Host record
To confirm that DNS server is resolving and replying to client DNS requests.
When troubleshooting DNS problems, ask yourself the following basic questions:
o What application is failing? What works? What doesn’t work?
o Is the problem basic IP connectivity, or is it name resolution?
o Have the things that don’t work ever worked on this computer or network? If so,
what has changed since they last worked?
DNS
Monitoring and Troubleshooting: Troubleshooting DNS
Used to perform DNS queries and to examine the contents of zone files on local
and remote servers
Offer the ability to perform query testing of DNS servers and to obtain detailed
responses at the command prompt.
Useful for:
o diagnosing and solving name resolution Problems
o verifying that resource records are added or updated correctly in a zone,
o debugging other server-related problems
DNS
Troubleshooting DNS: Nslookup
Change the
DNS server
Look up a
name
DNS
Troubleshooting DNS: Nslookup
Non-authoritative???
Round-robin
DNS
Troubleshooting DNS: Nslookup
Lookup mail
servers for a
domain
DNS
Troubleshooting DNS: Nslookup
Listing the
Contents of a
Domain
DNS
Troubleshooting DNS: DNSLint
After created, a new DNS record needs to replicate itself around to all of
the other DCs in your network
Once the new record exists on all of DC servers, your clients may still take a
little bit of time to utilize the new record
If you immediately test out a new DNS record just created and it's not
working, try to run the command ipconfig /flushdns on your client
computer
Integrating Dynamic DNS and IPv4 DHCP
Integrating Dynamic DNS and IPv4 DHCP
Appropriate for servers, but what about on the client and device side?
Are you willing to do static addressing if the company has 1000 devices?
What happens if the company changes to new IP address (sub)net
DHCP
Overview
1. Address please!
2. Want 172.18.160.101
1 3
3. I’ll take 172.18.160.101
4. Alright
2 4
DHCP Server
Subnet: 172.18.160.x 172.18.160.5
DHCP
How DHCP works
OK, Let’s do these. You go ahead use the network, and I register your MAC
address and other IP information in my DHCP database!
DHCP
Benefits of using DHCP
DHCP
DHCP server2 clients
87.5%
100%
50% of
of
oflease
lease
lease
duration has
DHCP server1 expired
DHCP uses scopes as the basis for managing and assigning IP addressing
information.
Contiguous range of addresses
There’s usually one scope per physical subnet
Each scope has a set of parameters, scope options, that can be configured
Scope options control what data is delivered to DHCP clients
DHCP
Address Pool
Enable the DHCP server to provide addresses from more than one scope
to clients on the same physical subnet
Helpful when clients within the same subnet have more than one IP
network and thus need IPs from more than one address pool
Must still configure other scope options individually for each child scope
DHCP
Exclusions and Reservations
Exclusions
o IP addresses within the range that you never want automatically assigned
o Used to set aside addresses that you want to assign permanently to servers
Reservations
o IP addresses within the range for which you want a permanent DHCP lease
o Essentially reserve a particular IP address for a particular device.
o The device still goes through the DHCP process but it always obtains the
same addressing information from the DHCP server.
DHCP
Installing DHCP
Installation process installs just the service and its associated snap-in
At that point, it’s not delivering any DHCP service
Installing the DHCP Service
1. Choose Server Manager by clicking the Server Manager icon on the Taskbar.
2. Click Add Roles And Features.
3. Choose role-based or feature-based installation and click Next.
4. Choose your server and click Next.
5. Choose DHCP Server, the click Add Features and click Next.
DHCP
DHCP configuration
DHCP server1
Domain
controller
Authorized
Services DHCP
requests
AD DS
DHCP server2
DHCP client Unauthorized
Does not service
DHCP requests
• If DHCP Server1 finds its IP address on the list, the service starts and supports
DHCP clients
DHCP
Verifying DHCP
From Server Manager, click on Tools menu and then choose DHCP
Add a reservation
DHCP
Managing DHCP scope
DHCP relay agent listens for DHCP broadcasts from DHCP clients, and then relays
them to DHCP servers in different subnets
DHCP DHCP
relay Unicast
Unicast server
agent
DHCP
broadcast Routers
(non–RFC 1542
compliant)
Subnet A Subnet B
Summary
DNS, and DHCP are the core services that underlie and support your
entire infrastructure
DHCP can help your company by issuing all of the TCP/IP settings to
your corporate clients
DNS was designed to be a robust, scalable, and high-performance system
for resolving friendly names to TCP/IP host addresses.
Learned how to install, configure, and manage these necessary services