This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
158
|
Chapter 4: Domain Name System
Host (A) Records
Host records, or A records, simply map a hostname to an IP address. You generally
create host records for each machine in your network.
A sample A record looks like this in a zone file:
colossus A 192.168.0.10
Using host records, you can implement a load-balancing technique known as round-
robin DNS. Round-robin DNS involves entering multiple A records, all configured
with the same hostname, but with different IP addresses that correspond to different
machines. This way, when computers contact a nameserver for a certain hostname,
they have an equally proportionate chance of receiving any one of the number of
machines with A records. For example, if I have a web site at www.hasselltech.net
and I have three web servers at 192.168.0.50, 192.168.0.51, and 192.168.0.52, I can
configure three A records, all named “www,” but with the three IP addresses men-
tioned earlier. Now, when client computers come to the nameserver and ask for the IP
address of www.hasselltech.net, they have a 33% chance of receiving 192.168.0.50 as
the web server of choice, a 33% chance of receiving 192.168.0.51, and a 33% chance
of receiving 192.168.0.52. It’s a poor-man’s load-balancing system.
Let’s get a bit more technical: in this scenario, Windows 2000 and
Windows XP clients will continue to attempt a connection to the first
web server that was originally resolved. A DNS cache timeout value on
the client is set to 86,400 seconds (one day) by default. If you change
this value on the client to one second, you have better odds of reach-
ing your server. You can change this value in the registry with the fol-
lowing key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
Dnscache\Parameters
Change the
MaxCacheEntryTtlLimit to the number of seconds desired.
If the group of machines that serve web sites are on different subnets, the DNS system
can return the “proper” address from a round-robin record set—that is, the one that is
closest to the client requesting it. This functionality is enabled by default. For example, if
you have one A record set up for www.hasselltech.net on IP address 192.168.0.51, and
another A record set up for the same hostname on IP address 10.0.0.25, a client com-
puter located on the 10.0.0.0 subnet will receive the 10.0.0.25 A record from his request,
and a client computer located on the 192.168.0.0 subnet will receive the 192.168.0.51 A
record from his request.

Get Learning Windows Server 2003, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.