NetworkClue.com
NetworkClue Home PageHome Contact UsContact ConsultingConsult
Bulletin Board
Internet Services covers Secrets to hosting websites, Hosting your own web server, and using DNS Servers.Operating Systems leads you through the decision of Linux vs. Windows, ideal installations and setups to create an efficient and redundant environment for your business, and great features to make management easier.Routing & Firewalls contains articles that will allow you to take control of your router. Learn how to protect your company with access lists and advanced firewall techniques.Hardware answers the common questions about Switches vs. Hubs, recommends SysAdmin Tools, and recommendations for adequate power protection.Utilities will cover fighting spam, using Anti-Virus programs effectively and the must haves for every administrator's software toolbox.


Bulletin Board

DNS Records

By Joshua Erdman
Digital Foundation, inc.

Just like a phone book with its various records (Business Listings, Residential, & Government) DNS uses several different records as well.

  1. Mail Server - MX
  2. DNS Server - NS
  3. Network Host - A
  4. Alias - CNAME
  5. Reverse Host Record - PTR
  6. Text Record - TXT

We will go over each DNS record, what they are specifically for and how you use them.

We will be referring to our Bind Domain File (each line has been assigned a number) throughout this article.

This is a great template file to use in Bind implementations. Notice the comments and the notes, each are preceded by the semi-colon. Since it is common to have several people working with the same domains, we need to keep everything standard and well documented.

Let's start off with a few observations

The top section (lines 1 - 8) are the global settings for the whole domain.

Line 1. Line one specifies that the Time To Live is 1 day. Since it precedes all other entries this is the default Time To Live for everything about this domain (even the entries that do not exist). This is especially handy because you cannot stop someone from putting a link on the internet to pron.domain.com but if you are currently controlling domain.com the DNS server out on the Internet will query your DNS server for pron.domain.com and of course your DNS server will say that it does not exist. Because of this 1st line those DNS servers are instructed to cache the information that pron.domain.com doesn't exist. This will save you bandwidth in the long run.

Line 2 - It is here where the Start Of Authority (or SOA) is declared. This states what DNS server has the master copy of the domain and the e-mail address of the person to contact if there are any problems (notice even though the last section on line 2 is an e-mail address, it does not have the @ symbol).

Line 3 - is where the 10-digit serial number is. Each time the domain is updated the serial number must be increased so show that there is a new version of that domain record. Typically people will use the current 4 digit year, the 2 digit month, 2 digit day, followed by 00. If this Domain Record was updated again on the same day, you jut change the last to digits from 00 to 01.

Line 4 - 6 - Line 4 specifies the refresh interval the secondary servers (backup servers or for load balancing) are to check with the primary (or authoritative server) about this particular domain. The 5th line is the length of time the secondary server should wait before it attempts to refresh when the last refresh has failed. The 6th line is the length of time from the last successful refresh before the secondary server will stop serving this domain.

Line 7 specifies the minimum amount of time the data should be kept in a server's cache. Very similar to the functionality of line 1 however it does not include the invalid or non-existent entries previously spoken about.

From line 12 to 26 each line has an entry in each column:
TTL, CLASS, TYPE, and the Record Data.

TTL is the Time To Live for that specific line (how long the DNS Servers out on the Internet should cache the data on this line before contacting your DNS server again. So if you plan on ever changing your website IP address for example, it is a good idea to change the TTL of the line(s) that specify the IP address of your website a few days before the change takes place. I would change it to something like 1H (1 hour). Then on the day you move your website to a different IP, the worst case scenario is that someone will be looking at the old address for the next hour.

Class will always be set to IN.

Type is the record type.  At the top of the article we listed 6:
A, NS, MX, PTR, CNAME, TXT

You will mostly use the A and MX records.

A records directly resolve a host to an IP address.

MX records provide Mail Exchanger (E-mail) resolution for which server to use for a specific domain.

CNAME records stand for Canonical Name, or alias, where the hostname listed resolves to another hostname.

PTR are pointer records that provide reverse DNS resolution, or IP address to Fully Qualified Domain Name.

Finally, TXT records are rarely used outside of listing an entry for SPF (Send Policy Framework).  Read more about the use of TXT records in your article: SPF and Sender ID.

Register.com

References:

There is so much more to DNS, here we only cover using DNS with 3 segments such as mail.company.com or www.company.com but there are ways to get more grangularity such as listing departments in the 3rd segment and devices in a 4th segment.  To get more information about this the O'Rilley and Associates book: DNS & Bind is a great resource.

I also recommend that you read my article on DNS Lookups.

Article last reviewed: 04/19/2006

Created by: Digital Foundation, inc.

Copyright © 2002-2005 Digital Foundation, inc. www.networkclue.com

All content of the NetworkClue website is copyrighted. Articles, notes, outlines, and all other materials may not be stored on the Internet or sold or placed by themselves or with other material in any electronic or printed format in whole or part. However materials may be referenced by links to the site.

 

Related Articles:
DNS & DNS Servers
Bind
MS-DNS
DNS & DNS Lookups
Internet Services

Books:





Search Amazon for
Books on DNS

 

 

 

Find your domain name: