How Host Names are Resolved
Winsock requires the IP address of the destination host to establish a session.
- Numbers are harder to remember than names, so people use host name resolution to match
up IP addresses to known host names.
Resolver software on the DNS client issues query statements sent to the DNS server.
- Programs that use resolver software include:
- Web browsers
- FTP clients
- Telnet clients
- DNS servers
C. The Order of Host Name Resolution
- Windows 2000 resolver caches the contents of the HOSTS file on system startup (This is
different than Windows NT4.0).
- If the resolver receives a request for an entry that is longer than 15 bytes, or if it
contains a period, it will be sent through the host name resolution sequence.
- If the request does not meet either of these specifications, it will be sent through the
NetBIOS name resolution sequence.
- The HOSTS file can be found at %systemroot%\system32\drivers\etc.
4. The Windows2000 name resolution sequence is as follows (Assuming there is
DNS and WINS in the network environment):
Local Host Name
Hosts File (Read into local DNS cache at startup)
DNS Server
NetBIOS name server (WINS)
Broadcast
LMHosts file
5. The Windows 2000 caching resolver:
- Part of DNS Client Services
- The resolver formulates and issues queries sent by the client to the DNS Server.
Able to cache both positive and negative responses
c. Example: Resolving www.shinder.net to 209.217.17.13
will include a TTL (time-to-live) on the record. That means if the query failed, future
queries of the same type will return a failure immediately instead of burdening the
network with a query that the TTL record knows will fail. The default for TTL is five
minutes, so any query of the same type placed after six minutes of the first query will be
treated like the first time.
D. Recursive Queries
- Recursive queries have only two answers: basically "yes" (positive) and
"no" (negative). There must be a response.
- Positive response returns the IP address
- Negative response returns "host not found" type error
- Example: If you were asked, "What year was DOS invented?" you could answer
"1981" (a positive response) or "I dont know" (a negative
response)
- While your brain was thinking, "Is it 1981, 1985, or am I unsure?" your brain
was performing a recursion (trying to decide on a "yes" or "no"
answer).
2. Benefits of recursive queries:
- Less network traffic when a DNS server performs recursion rather than having each client
perform its own
- All machines using a particular DNS server benefit from having access to this
centralized cache
- Improved security in strategically placing your DNS servers so no external DNS server
ever requires access to a DNS server located on the internal network
E. Iterative Queries
- Iterative queries return a referral response containing the IP address of another DNS
server that may be able to service the query. See Figure 3-2 on page 124.
F. Looking up an address from a name (forward lookup)
- Uses both recursive and iterative queries.
- The sequence of events during the host name resolution process using both recursive and
iterative queries is explained on pages 125 through 127 of your main text.
- Using the sequence of events as a guide, perform Exercise 3-1on page 128: Performing a
Forward Lookup.
Looking up a name from an address (reverse lookup)
Resolving a known IP address to a host
- Like knowing someones telephone number but not knowing his name
- Reverse lookups query reverse lookup zones.
- The primary index for the Domain Name System is the domain name.
- The DNS is rather like the phone book, which is organized by last name, not by the
telephone number.
- The in-addr-arpa Domain uses Network IDs as the index value.
- allows you to search by IDs
- Reverse lookup zones go from specific to general when moving from left to right, just as
forward lookup zones do.
- A Network ID of 21.18.189.0s entry in the in-addr.arpa subdomain is
189.18.21.in-addr.arpa.
- The iterative and recursive query process works the same when performing reverse lookups
as it does when performing forward lookups.
- Perform Exercise 3-2 on page 130 in your main text: Looking up a host name from an IP
address.
II. Windows 2000 DNS Server Roles
- Primary DNS Server
- Characteristics:
- Contains the only copy of the zone database that can be changed
- Is authoritative for the domain(s) contained in its zone files
- Those domains respond directly to DNS queries
- Characteristics shared with all DNS servers:
- The zone database information is stored in the %systemroot%>\system32\dns directory.
- They have the ability to boot from either the registry or a boot file
- They have the ability to cache resolved queries.
- They have a cache.dns file (or "root hints" file) that contains host name to
IP address mappings for the Internet DNS Root servers.
- Configuring the DNS Server via the Boot File and DNS Management Console
- Server configuration is done through the DNS Management console, which is the default
and preferred setting.
- You may also configure the DNS server through the BOOT file, which UNIX Administrators
are accustomed to.
- You can choose to boot from the Registry, the BOOT file, or Active Directory.
- Microsoft recommends that you "pick your poison" and stick with it.
- Do not switch between the use of the BOOT file and the DNS Management Console.
4. DNS Server Caching
- The cache.dns file (the "root hints" file) contains host name and IP address
mappings for the Root Internet DNS servers.
- If a DNS server receives a recursive query for a domain for which it is not
authoritative, it must complete recursion by issuing iterative queries.
- The cache.dns file is located in the same directory as the zone files.
- Internet Root server mappings change periodically.
- A Primary DNS server can be a Secondary DNS server for another zone.
- A Primary DNS server that receives zone transfers from another Primary server acts in
the role of Secondary for that zone.
- Any DNS server can contain either or both Primary or Secondary zone files.
- The Primary zone file is read/write and the Secondary zone file is read-only.
B. Secondary DNS Servers
1. Functions:
- Fault tolerance: if the Primary DNS server is disabled, the Secondary can answer
requests for the zone
- Load balancing: by distributing the query load, the Primary server is not as affected by
large volumes of query traffic
2. Bandwidth conservation: Secondary
servers can be placed in remote locations, reducing the need to traverse a WAN for name
resolution
C. Caching-Only Servers
- All DNS servers have a cache.dns file that contains the IP addresses of all Internet
Root servers. The caching-only server uses this list to begin building its cache. It then
adds to the cache as it issues iterative queries when responding to client requests. (See
Figure 3-4 on page 137)
- Traits of caching-only servers:
- DNS Forwarding and Forwarder Servers
- The DNS server receiving the forwarding servers query is the forwarder.
- The process of forwarding a DNS query involves both a forwarding DNS server and a
forwarder DNS server.
- Host Name Lookup Using Forwarders
- The forwarder begins to resolve the host name in the query by doing one of the
following:
- retrieving the information from its cache
- retrieving the information from a zone file
- issuing a series of iterative queries
See Figure 3-5 on page 139.
- If the forwarder cannot resolve the host name to an IP address, it will return to the
forwarding DNS server a "host not found" error.
- The Preferred DNS server (the forwarding server) will then attempt to resolve the host
name itself.
- Forwarders and Firewalls
- The slave server/caching-only forwarder duo protects your intranet zone data from
Internet intruders.
- Firewalls keep users on the outside from accessing information on internal DNS servers
Figure 3-6 on page 141 illustrates the forwarder and slave setup and how it protects
internal zone records.
E. Dynamic DNS Servers (DDNS)
- Windows 2000 server has the ability to dynamically update the information contained in
its zone databases.
- This is the one main difference between the Windows 2000 DNS server and previous
versions of Microsoft DNS.
- Note: Because DNS zone database files were designed to be static, any updates that need
to be made to the zone contents must be done manually by the DNS administrator.
- DNS Update Protocol
- Windows 2000 DNS server supports the Dynamic DNS update protocol.
- Windows 2000 clients use the DHCP client service to update a Dynamic DNS server with
their host name and IP address information.
- The DNS client information is dynamically updated on a Primary DNS server, regardless of
whether Active Directory or Standard zone types has been employed.
- If the Preferred DNS server is a Secondary, then the client will query the Secondary for
the Start Of Authority (SOA) record for the zone.
- When the Windows 2000 client obtains the name of a Primary server for the
zone, it will attempt to update its Host (A) and Pointer (PTR) records, depending on how
you have configured dynamic updates to occur.
- A Windows 2000 machine with a static IP address always updates both its A and PTR
records itself.
- By default, a Windows 2000 DHCP client updates its own A record, and the DHCP server
updates the PTR record; however, this behavior can be altered.
- A downlevel client cannot directly update its own information directly with a Dynamic
DNS server but can do so using a Windows 2000 DHCP server as a "proxy."
- RAS clients and dynamic update
- RAS clients always register their own information directly with the DNS server and never
interact with a DHCP server.
- The RAS client registers both its A and PTR records itself.
- Name Collisions
- A name collision occurs when a machine tries to update its name in the zone database and
finds that its name already exists with a different IP address.
- By default, the DNS client will overwrite the existing record with its own information,
which can pose security risks. To avoid this, you can:
- Disable the clients ability to overwrite the existing record by adding the
DisableReplaceAddressesInConflicts entry with a value of 1 to the following registry
subkey:
|HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\Tcpip\Parameters
- Enable secure dynamic updates, which can only be done with Active Directory integrated
zones
- Perform Exercise 3-3 on page 144: Enabling Dynamic Updates on a Windows 2000 DNS Server.
III. Integrating Windows 2000 DNS Server with Active Directory
- Advantages
- Active Directory integrated zones use the Active Directory replication engine, so there
is no need to create separate DNS and Active Directory replication topologies.
- Rather than transferring the entire record, per property zone transfers are available
when the zone is Active Directory integrated.
- All Active Directory integrated DNS zones are Primary zones, which offer more fault
tolerance when DNS clients need to dynamically update their records on a Dynamic DNS
server.
- Secure dynamic updates of the DNS zone database prevents rogue machines from taking over
another machines mapping.
- Active Directory domain names are also DNS domain names.
- Secure Dynamic Updates
- Dynamic updates are made through the Generic Security Service API (GSS-API).
- Windows 2000 does not support other common update methods such as System Security
Extensions and Secure Domain Name System Dynamic Update.
- The GSS-API uses Kerberos to establish a secure connection. Two types of resource
records are used to establish the secure context:
- TKEY: Used to transfer security tokens between the DNS client and server. It establishes
the secret key that will be used with the TSIG resource record.
- TSIG: Used to send and verify messages that have been signed with a hash algorithm.
Insider Information
Why do they call it Kerberos?
In Greek mythology, Kerberos was the name of the three-headed dog that guarded the
entrance to Hades. Those who know their Greek mythology may remember that the dog who
guarded the entrance was called Cerberus, not Kerberos. Cerberus is the Latin spelling of
the Greek Kerberos. In Latin, the letter 'c' is always hard, and the letter u
in Cerberus is also differentinstead of being a long u sound, it is
something between 'oos' and 'ous,' so Cerberus is pronounced 'Ker-ber-ous.' I find it
interesting that the industry chose Kerberos (who guards hell) instead of the Angel
Gabriel (who guards heaven). I suppose its all a matter of perspective.
- Negotiating a Secure Context
- Through the exchange of Keys (short for Public Key Infrastructure [PKI]), DNS clients
can send update requests to the DNS server. This prevents machines from pirating the name
of another legitimate machine on the network.
- Figure 3-7 on page 149 shows the Secure dynamic update negotiation in progress.
- DnsUpdateProxy
- Only the owner of the record can update a resource record, and this can cause problems.
- Examine the problem given on page 149 and discuss the solution provided on page 150,
using Figure 3-8 on page 151 as a reference.
- Domain Controllers in the DnsUpdateProxy Group
- Because of potential security problems, Microsoft recommends that you not implement DHCP
servers on domain controllers.
- Perform Exercise 3-4 on page 152: Adding a DHCP Server to the DnsUpdateProxy Group.
- Active Directory Integrated Zone Replication
- All Active Directory integrated zones are Primary.
- No single point of failure
- The Active Directory allows for multimaster replication using the Active Directory
replication engine.
- Because of this, a single "downed" Primary DNS Server will not prevent zone
transfers and zone updates.
- SRV Records in Windows 2000 DNS
- SRV Records replace the "hidden" 16th character.
- For WINS clients, the client could query the WINS database for the desired service by
examining the 16th character service identifiers recorded in the WINS database.
- Manually Adding SRV Records
- To view the SRV resource records created by a domain controller, open and view the
netlogon.dns file (created when Active Directory was installed).
- netlogon.dns file can be found in %systemroot%\System32\Config\Netlogon.dns
- When creating a new SRV record for a domain controller, be sure that the record is
placed in the correct container object in the Active Directory as specified by the path in
the netlogon.dns file.
- Perform Exercise 3-5 on page 155: Adding a SRV Record Manually to the DNS.
IV. Integrating Windows 2000 DNS Server with DHCP
- The Windows 2000 DHCP server can deliver host name and IP addressing information to a
Windows 2000 DNS Server so downlevel clients can take advantage of the services available
via a Dynamic DNS Server.
- After assigning a DHCP client an IP address, the Windows 2000 DHCP server interacts with
a Windows 2000 DNS Server in one of three ways:
- It will update the DNS server by providing information to create a Host (A) resource
record and PTR (Pointer) record.
- The DHCP server will update both the Address and the Pointer record, regardless of the
client request.
- The DHCP server will never register information about the DHCP client, but the client
itself may contact the Dynamic DNS server directly with this information. Figure 3-9 on
page 161 shows these interactions.
- Perform the Exercise 3-6 on Page 162: Enabling Dynamic Updates for Downlevel DNS/DHCP
Clients.
- Managing the Windows 2000 DNS Server
- Configuring Server Properties
- Open the DNS console and right-click the name of the server you wish to configure. You
should see what appears in Figure 3-10 on page 164.
- Discuss the options on the various tabs:
- The DNS Server Properties Interfaces tab (page 163; Figure 3-10, page 164)
- The DNS Server Properties Forwarders tab (page 164; Figure 3-11, page 165)
- The DNS Server Properties Advanced tab (page 164; Figure 3-12, page 165)
- The Root Hints tab (page 167; Figure 3-13, page 167)
- Configuring Zone Properties
- Once the server is configured, you need to configure the zones you have created on the
server. Each zone is configured separately. Right-click the zone of choice and then click
the Properties command on the context menu. (See Figure 3-14 on page 169)
- Discuss the options on the various tabs:
- The Start of Authority (SOA) tab (page 169; Figure 3-15, page 170)
- The Name Servers tab (page 171; Figure 3-16, page 171)
- The WINS tab (page 171; Figure 3-17; page 172)
- The WINS TAB looks different for reverse lookup zones. Right-click one of your reverse
lookup zones and click Properties. Now click the WINS-R tab, and you will see Figure 3-18
on page 173.
- Configuring Windows 2000 DNS Clients
- Manually Configuring DNS Client Settings:
- You must be sitting at the local machine to perform manual configuration. Right-click
the My Network Places icon on the desktop and select Properties. Now double-click Local
Area Connection and then click Properties to bring up the Local Area Connection Properties
dialog box.
- Scroll down the list of network components, find the Internet Protocol (TCP/IP) option,
and click Properties.
- Go to the General Tab. This will bring you to the Advanced TCP/IP Settings dialog box.
Click the DNS tab and you will see what appears in Figure 3-19 on page 174.
- Configuring DNS Clients Using DHCP
To avoid unnecessary administrative tasks, you can use a DHCP server to assign DNS
configuration and information to your Windows 2000 DHCP clients.
- Create a scope on the DHCP server.
- Define the 006 DNS Servers option for the scope.
- Figure 3-21 on page 176 shows the Scope Options dialog box on a DHCP server.
- Perform Exercise 3-7 on page 177: Disabling Replication of WINS-Specific Resource Record
Data.
VI. Monitoring and Troubleshooting DNS
- IPCONFIG
IPConfig has been improved in Windows 2000 over Windows NT 4.0. It includes new
switches that help with DNS management.
- Ipconfig /flushdns: Allows you to clear the local machines DNS cache
- Ipconfig /displaydns: Prints out the local DNS cache
- Ipconfig /registerdns: Renews a DHCP clients lease and re-registers the DNS
clients address information with a DNS server
- NSLookup
- Command-line utility used to test and query your DNS servers zone databases
- Works in two modes: interactive and command
- Table 3-1 on page 180 shows a list of "set" commands used in Interactive mode.
- Perform Exercise 3-8 on page 180: Using the Nslookup Utility.
- Using the System Monitor
- Windows 2000 DNS Server has a large number of DNS-related counters that are placed into
the System Monitor application upon installation.
- New counters have been added to the Windows 2000 DNS Object counter list, as shown in
Table 3-2 on pages 182 through 185.
- Using Event Viewer
- The Event Viewer provides information:
- when zone transfers have occurred
- on whether there was a problem with a zone transfer
- when changes have taken place within the zone
- on excessive numbers of changes that have been made to the zone for a specific period of
time
- You can install a help file (from the Windows 2000 Server Resource Kit), which has a
list of event codes and their meanings.
- Using Trace Logs
- To get extremely detailed information about the DNS servers activities, enable
trace logging through the graphical user interface.
- To enable trace logging, right-click the server name in the DNS Management Console and
click Properties. You will see a box similar to that shown in Figure 3-22 on Page 186.
- The log file can be found at %system_root%\system32\dns\dns.log
- Network Monitor
- Out-of-box version of Network Monitor for Windows 2000 Server allows you to analyze
packets coming to or leaving the server.
- If you want a full-featured version of Network Monitor, you can purchase Microsoft
Systems Management Server 2.0, which lets you listen to all traffic on the segment.
- Figure 3-23 on page 187 shows the Network Monitor.
- The Monitoring Tab
- After completing configuration of DNS server, check to see if the server can
successfully perform simple and recursive queries.
- Right-click the name of the server, select Properties, then click the Monitoring Tab.
You can perform the following:
- A simple query against the DNS server
- A recursive query to other DNS servers