Resource Records
A DNS zone contains various types of
entries, called resource records. Resource
records are the meat of a DNS zone, providing information about
hostnames, IP addresses, and in some cases the services offered by a
particular machine. There are several different classes of record
types, the most common of which I’ll define now.
Warning
Don’t use either a “-” or a “_” as the first character in any DNS name, as they are not compliant with the DNS standard. Confusingly, Windows DNS systems will accept these entries, but it’s best to stay away from them.
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 mentioned earlier. Now, when client computers come to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access