Implementing DNS
Implementing DNS
Implementing DNS
Contents:
Module Overview
Lesson 1:
Lesson 2:
Lesson 3:
Lab:
Implementing DNS
Module Review and Takeaways
Module Overview
Name resolution is the process of software translating betwe
en names that users can read and understand, and numeric
al IPaddresses, which are necessary for TCP/IP communicatio
ns. Because of this, name resolution is one of the most impo
rtant conceptsof every network infrastructure. You can think
about DNS as being like the Internets phone book for compu
ters. Client computersuse the name resolution process when
locating hosts on the Internet and when locating other hosts
and services in an internalnetwork. Doman Name System
(DNS) is one of the most common technologies for name res
olution. Active Directory DomainServices
(AD DS) depends heavily on DNS, as does Internet traffic. Thi
s module discusses some basic name resolution concepts, a
ndinstalling and configuring a DNS Server service and its co
mponents.
Objectives
Lesson Objectives
Name Type
The type of name that an app uses, either host name or Net
BIOS name, is determined by the application developer. If th
e applicationdeveloper designs an application to request net
work services through Windows sockets, host names are use
d. If, on the other hand,the application developer designs an
application to request services through NetBIOS, a NetBIOS
name is used. Most current apps,including Internet apps, use
Windows socketsand thus use host namesto access netw
ork services.
Host Names
When you select host names, you should create host names
that are intuitive and relatively easy-to-remember, yet still u
nique. Thefollowing lists some best practices to implement w
hen creating host names:
Select computer names that are easy for users to remember.
Identify the owner of a computer in the computer name. For example, jo
Select names that describe the purpose of the computer. For example, a
erver stores information related to past accounts.
Do not use character case to convey the owner or purpose of a compute
Match the Active Directory domain name to the primary DNS suffix of the
Use unique names for all computers in your organization. Do not assign t
DNS domains.
What Is DNS?
PTR Records
When you create host records in the DNS console, you also h
ave the option to make a PTR record at the same time, if an
appropriatereverse lookup zone exists. PTR records can be cr
eated automatically and added to a reverse lookup zone whe
n an A record iscreated in a forward lookup zone. These PTR
records are automatically deleted if the corresponding A reso
urce record is deleted. Youonly need to manually create a PT
R record once. Since it is not tied to an A resource record, it i
s not deleted if the A resource recordis deleted. Client comp
uters can create their PTR records when they dynamically up
date. A PTR record is in the format of IP Address,type of reco
rd (PTR) and hostname.
Many standard Internet protocols rely on reverse lookup zon
e lookup data to validate forward lookup zone information. F
or example,if the forward lookup indicates that training.cont
oso.com is resolved to 192.168.2.45, you can use a reverse l
ookup to confirm that192.168.2.45 is associated with trainin
g.contoso.com.
Note: In Windows Server 2008 R2 and Windows Server 2012
, you can also use DNSSec technology to perform similar typ
e ofverification. There are new enhancements to DNSSec in
Windows Server 2012 R2 in encryption key management; ho
wever,these enhancements are beyond the scope of this les
son.
Many email servers use a reverse lookup as one way of redu
cing spam. By performing a reverse lookup, email servers try
to detectopen Simple Mail Transfer Protocol (SMTP) servers
(open relays).
Resource Records
rnet side, and to ensure that outside the firewall access only
goes to the DNS server deployed on theInternet side.
Because DNS is such a vital function for the AD DS, the DNS
server role is usually included with domain controllers when
they aredeployed. This role can be integrated into AD DS so
that DNS records are stored as Active Directory objects and
attributes. The DNSzone type in this instance is referred to a
s Active Directory Integrated
(ADI). ADI zones replace DNS zone transfers with AD DSrepli
cation and can ensure secure dynamic updates of client reco
rds to the zone. In a domain, using ADI DNS is considered a
bestpractice.
With Split DNS, internal clients are only configured with the I
P addresses of the ADI DNS servers, which are domain contr
ollers. Allclient DNS dynamic updates are written to the serv
ers. All DNS queries from internal clients go only to these DN
S servers. If anyresolutions for names are needed beyond th
e internal domain, such as for Internet web servers, the ADI
DNS servers forward theserequests to the Internet-facing DN
S server. The Internet-facing DNS servers are normally deplo
yed in the perimeter networkbetween the firewalls. Although
they have the same domain name as the ADI DNS servers, t
he Internet-facing DNS servers do notstore the same data. Al
l records in the Internet-facing DNS server zone are created
manually. Normally the Internet-facing DNSserver zone only
contains records for itself and other servers that are located
in the perimeter network and need to be accessed fromthe I
nternet.
When a query to the Internet-facing DNS server comes in fro
m the Internet requesting a resolution on any domain-level r
esource,such as an SRV record, the Internet-facing DNS serv
er rejects the query because it does not have any of the SRV
recordsthese areonly stored in the domain ADI DNS server
s. Because it considers itself authoritative for the zone, the I
nternet-facing DNS server doesnot make an iterative query t
o the ADI DNS servers.
name resolution.
Implementation of these services is not practical for any reason.
These services are not available.
For example, you might want to set up a temporary network
for testing purposes without a server infrastructure.
LLMNR is supported on Windows Vista, Windows Server 20
08, and all newer Windows operating systems. It uses a simp
le systemof request and reply messages to resolve computer
names to IPv6 or IPv4 addresses. For a node to respond to a
LLMNR requestNetwork Discovery must be enabled, but Net
work Discovery is not needed just to make a request for nam
e resolution.
To use LLMNR, you need to turn on the Network Discovery fe
ature for all nodes on the local subnet. This feature is availab
le in theNetwork and Sharing Center. Be aware that Network
Discovery is usually disabled for any network that you desig
nate as Public.
If you want to control the use of LLMNR on your network, you
can configure it via Group Policy. To disable LLMNR via Group
Policy,set the following Group Policy value:
Group Policy = Computer Configuration\Administrative Templ
ates\Network\DNS Client\Turn off Multicast Name Resolution.
Set this value to Enabled if you do not want to use LLMNR, or
to Disabled if you want to use LLMNR.
DNS
WINS
.
5
Converts the host name to a NetBIOS name and checking the local NetBIO
.
6
Contacts the hosts configured WINS servers.
.
7
Broadcasts as many as three NetBIOS name query request messages on
.
8 Searches the Lmhosts file.
. Note: You can control the order used to resolve names. For example, if yo
ngesthe order in which the NetBIOS name resolution methods are attemp
Additional Reading: To learn more about LLMNR, please se
e http://go.microsoft.com/fwlink/?LinkID=331077.
RequestSent
ResponseReceived
SuccessReceived
SuccessSent
Successful and received when the DNS server is a secondary server for
Successful and received when the DNS server is a primary server for a z
DynamicUpdateRejected
$statistics.ZoneUpdateStatistics
Command-Line Tools and Commands for Troubleshooti
ng
The command-line tools and commands that you use to trou
bleshoot these and other configuration issues are as follows:
Nslookup. Use this tool to query DNS information. The tool is flexible and
n test zone transfers,security options, and MX record resolution.
DNSCmd. Use this command-line tool to manage the DNS server role. Thi
ervers on your network.
Dnslint. Use this tool to diagnose common DNS issues. This tool diagnose
Reference Links: The Dnslint command can be downloaded from http://
Ipconfig. Use this command to view and modify IP configuration details th
cal DNS cache using thecommand ipconfig /displaydns, and you can cle
Monitoring on DNS server. Perform simple local queries and recursive quer
he DNS server Monitoringtab is available only in Windows Server 2008 and
In Windows Server 2012, there is a new set of Windows Powe
rShell cmdlets in that you can use for DNS client and server
management. Some of the most commonly used cmdlets are
as follows:
Clear-DNSClientCache. This cmdlet clears the client cache, similar to i
Get-DNSClient. This cmdlet displays the details of the network interface
Get-DNSClientCache. This cmdlet displays the content of the local DNS
Register-DNSClient. This cmdlet registers all of the IP addresses on the
Resolve-DNSName. This cmdlet performs a DNS name resolution for a
Set-DNSClient. This cmdlet sets the interface-specific DNS client config
Test-DNSServer. This cmdlet tests that a specified computer is a functio
Clear-DNSClientCache
2 Attempt to ping the remote host by its IP address. This helps identify whe
. esolution.
3 Attempt to ping the remote host by using its host name. For accuracy, us
. Ping LON-dc1.contoso.com
4 If the ping is successful, the problem is probably not related to name reso
. ce, in theprevious Contoso, Ltd. example, you would add the following lin
10.10.0.10LON-dc1.contoso.com
5 Perform the Ping-by-host-name test once more. Name resolution should n
. type the following, oruse the equivalent Windows PowerShell cmdlet:
Ipconfig /displaydns
6
Remove the entry that you added to the hosts file, and then clear the res
.
7 At the command prompt, type the following command:
. Nslookup.exe -d LON-dc1.contoso.com. > filename.txt
Examine the contents of the filename.txt file to identify the failed stage in
Note: You should also know how to interpret the DNS resolv
er cache output so that you can identify whether the namere
solution problem is with the client computers configuration,
the name server, or the configuration of records within the n
ameserver zone database. Interpreting the DNS resolver cac
he output is beyond the scope of this lesson.
4.
Get-DnsClientServerAddress
In the Network and Sharing Center, record the static TCP/IP addre
omatic.
Switch back to Windows PowerShell and run the following cmdlet, an
5.
6.
Get-DnsClientServerAddress Clear-DnsClientCache
Write the Interface Index value of the Ethernet interfaces IPv4 row, he
Run the following cmdlet:
7.
Resolve-DnsName lon-dc1
Note that that the cmdlet issues the following error message: A DNS s
Run the following cmdlets, where X is the Interface Index value that yo
3.
8.
9.
dc1
The error does not report back, and an address is returned.
Switch back to the Network and Sharing Center and enter the stati
In Windows PowerShell, use the following cmdlets:
9.
Lesson Objectives
After completing this lesson, you will be able to:
Describe the components of a DNS solution.
Describe root hints.
Describe DNS queries.
Describe forwarding.
Explain how DNS server caching works.
Explain how to install the DNS server role.
DNS Server
DNS Resolver
Root hints are a list of the 13 FQDNs on the Internet that you
r DNS server uses if it cannot resolve a DNS query by using i
ts ownzone data, a DNS forwarder, or its own cache. The roo
t hints list the highest servers in the DNS hierarchy, and can
provide thenecessary information for a DNS server to perfor
m an iterative query to the next lowest layer of the DNS nam
espace.
Root Servers are installed automatically when you install the
DNS role. They are copied from the cache.dns file that is incl
uded in theDNS role setup files. You also can add root hints t
o a DNS server to support lookups for non-contiguous domai
ns within a forest.
When a DNS server communicates with a root hint server, it
uses only an iterative query. To configure a server to use onl
y recursivequeries to a forwarder, configure the forwarder on
the DNS server properties. If you want to disable all iterative
queries, deselect theUse root hints if no forwarders are
available check box on the Forwarders tab. If you configure
the server to use only aforwarder, and you disable root hints,
Recursive Queries
Iterative Queries
Iterative queries access domain name information that resid
es across the DNS system. You can use iterative queries to r
esolvenames across many servers quickly and efficiently. Wh
en a DNS server receives a request that it cannot answer usi
ng its localinformation or its cached lookups, it makes the sa
me request to another DNS server by using an iterative quer
What Is Forwarding?
Conditional Forwarder
A conditional forwarder is a DNS server on a network that for
wards DNS queries according to the querys DNS domain na
me. Forexample, you can configure a DNS server to forward
all queries that it receives for names ending with corp.conto
so.com to the IPaddress of a specific DNS server, or to the IP
addresses of multiple DNS servers. This is useful when you h
ave multiple DNSnamespaces in a forest.
Conditional Forwarding in Windows Server 2008 R2 an
d Windows Server 2012
In Windows Server 2008 R2 and Windows Server 2012, the c
onditional forwarder configuration is in a node in the DNS co
nsole. Youcan replicate this information to other DNS servers
through Active Directoryintegrated DNS.
Best Practice: Use conditional forwarders if you have multi
ple internal namespaces. This results in faster name resoluti
on.
1.
2.
Configure forwarding
Lesson Objectives
Primary Zone
When the DNS server is both the host and the primary sourc
e for information about a zone, the zone is a primary zone. I
n addition,the DNS server stores the master copy of the zon
e data either in a local file or in AD DS. When the DNS server
stores the zone datain a file, the primary zone file by default
is named zone_name.dns, and is located on the server in the
%windir%\System32\Dnsfolder. When the zone is not stored i
n AD DS, the primary zone server is the only DNS server that
has a writable copy of thedatabase.
Secondary Zone
When the DNS server is the host, but is the secondary sourc
e for zone information, the zone is a secondary zone. The zo
neinformation at this server must be obtained from another
DNS server that also hosts the zone. This DNS server must h
ave networkaccess to the DNS server to receive updated zon
e information.
Because a secondary zone is a copy of a primary zone that a
nother server hosts, the secondary zone cannot be stored in
AD DS.Secondary zones can be useful if you are replicating d
ata from non-Windows DNS zones.
Stub Zone
Demonstration Steps
Promote a server as a domain controller
1. Install the AD DS server role on LON-SVR1.
2. Start the Active Directory Domain Services Configuration Wizard.
3. Install the DNS Server service.
Create a record
Create a New Host record in Contoso.com zone named www, and have
Objectives
Lab Setup
Estimated Time: 40 minutes
Virtual machines
20410C-LON-DC1
20410C-LON-SVR1
20410C-LON-CL1
User name
Adatum\Administrato
Password
Pa$$w0rd
For this lab, you will use the available virtual machine enviro
nment. Before beginning the lab, you must complete the foll
owing steps:
1. On the host computer, click Start, point to Administrative Tools, and
2. In Hyper-V Manager, click 20410C-LON-DC1, and in the Actions pan
3. In the Actions pane, click Connect. Wait until the virtual machine start
4. Sign in using the following credentials:
o User name: Administrator
o Password: Pa$$w0rd
o Domain: Adatum
5. Repeat steps 2 to 4 for 20410C-LON-SVR1 and 20410C-LON-CL1.
Scenario
Contoso is a partner organization working closely with users
in the new branch office. In order to support name resolution
between ADatums branch office and Contoso, you decide to
enable DNS forwarding between the two DNS domains.
As part of configuring the infrastructure for the new branch o
ffice, you must configure a DNS server that provides name r
esolution forthe branch office. This includes the forwarding f
3.
If you do not see these zones, open Active Directory Sites and Services
hen repeat steps 1 and 2.
Task 6: Use Windows PowerShell commands to test no
n-local resolution
1. On LON-SVR1, make 127.0.0.1 the preferred DNS server for LON-SV
e X is the Interface Index number, which you can find in the Get-DnsCli
Set-DnsClientServerAddress InterfaceIndex X ServerAddress 0.0.0.0
2. Open a Windows PowerShell window on LON-SVR1, and try to resolve
DNSNamecmdlet.
You receive a negative reply (this is expected).
Task 7: Configure Internet name resolution to forward
to the head office
1. Type the following cmdlet, and then press Enter:
2.
Restart-Computer
Task 8: Use Windows PowerShell to confirm name res
olution
1. Sign in to LON-SVR1 as Adatum\Administrator with the password P
2. In Windows PowerShell, type the following cmdlet, and then press Ente
nslookupwww.contoso.com
You should get a reply and an IP address.
Results: After completing this exercise, you should have inst
alled and configured DNS on 20410C- LON-SVR1.
Scenario
After you changed some host records in zones configured on
LON-DC1, you noticed that clients that use LON-SVR1 as thei
r DNSserver were still receiving old IP addresses during the n
ame resolving process. You want to determine which compon
ent is cachingthis data.
The main tasks for this exercise are as follows:
1. Use the ping command to locate an Internet record from LON-CL1.
2. Update an Internet record to point to the LON-DC1 IP address.
3. Examine the content of the DNS cache.
4. Clear the cache, and retry the ping command.
Task 1: Use the ping command to locate an Internet re
cord from LON-CL1
1. On LON-CL1, in the Command Prompt window, use ping to locate www
Best Practices
Tools
Tool
Use
Nslookup
Troubleshoot DNS
Ipconfig
Troubleshoot DNS