starclick

Thursday, 21 November 2013

DNS Record Types

Most of the time, when someone talks about a DNS record, they are referring to the simple "directory enquiries" way of mapping a computer's name to its IP address, but this isn't always the case. The DNS can be used to find out other information as well by using different DNS record types.

Common DNS Record Types

  • NS – specifies which are the DNS servers for your domain;
  • A – specifies IP addresses corresponding to your domain and its subdomains;
  • MX – specifies where the emails for your domain should be delivered;
  • CNAME – specifies redirects from your domain’s subdomains to other domains / subdomains;
  • SPF – Sender Policy Framework (SPF)
A
An A record translates a computer's name to its IP address. Sometimes it may translate to multiple IP addresses when there are many computers perfoming the same role.
gondolin.org.uk A 173.254.28.64
AAAA
An AAAA is the IPv6 version of a A record. This is the future. For now, almost everyone still uses IPv4, so you won't see this much.
Techy note [+]
archive.ubuntu.com AAAA 2001:67c:1360:8c01::1a
PTR
A PTR record translates a computer's IP address to its name. In many cases the A record and PTR record for any machine on the Internet will match (just lookup one to find the other). In practice, the PTR record is often forgotten (which can cause occasional problems) or gives the name of the host computer (in cases where multiple services live on the same computer, as in the example below).
Techy note [+]
173.254.28.64 PTR just64.justhost.com.
MX
An MX record returns the name of the mail server (or servers - there can be more than one) for a domain. This is mainly used by other mail servers so that they know which machine they should deliver outgoing messages to.
MX, or mail exchange, records describe the machines to contact in order to send mail to a given DNS node
Techy note [+]
ubuntu.com MX 10 mx.canonical.com

                 
norbert.dept1.cornell.edu86400A128.253.180.254
norbert.dept1.cornell.edu86400MX10mailhost.dept1.cornell.edu
          
          norbert.dept1.cornell.edu86400MX20mailhost2.dept1.cornell.edu

          norbert.dept1.cornell.edu86400MX30mailhost3.dept1.cornell.edu
NS
This returns the names of the name servers for a domain. Most of the time there should be more than one of these. It is this that allows one name server to refer you to another when needed (e.g. looking up details in a subdomain)
ubuntu.com NS ns1.canonical.com
ubuntu.com NS ns2.canonical.com
TXT
The TXT record stores general-purpose text. Originally this was used for descriptions and other helpful information, but nowadays it is also used to store information for specific services (e.g. the SPF email anti-fraud system) 
slashdot.com TXT "SourceForge, Inc."
 
CNAME
A CNAME record provides a way to give an alias to a host name, typically used to give friendly names for computers with hard-to-remember ones or to provide service names (like "mail" or "www")
www.gondolin.org.uk CNAME gondolin.org.uk
SOA
                 
                  The SOA resource record is always the first record in a DNS zone. Set the Primary Server to your primary nameserver
This one is a bit special and not something many people really need to worry about. SOA stands for "start of authority" and it exists in every single Internet domain, providing information used by other name servers to ensure they carry up to date information about the zones they manage.
Techy note [+]
gondolin.org.uk SOA ns1.pipedns.com. root.cl18.justhost.com. 2013021101 86400 7200 3600000 300
Just to add an extra level of complexity, most of the above types can have more than one value. For example, an MX record can list multiple mail servers along with a preference value to indicate in which order they should be contacted (try one and if it doesn't answer try the next on the list).

No comments:

Post a Comment

Every Admin Should Know These Commands Active Directory 1.   To quickly list all the groups in your domain, with members, run this c...