Powered By Blogger

Saturday, August 14, 2010

DN(as)S

A = Address record, A records are used to map an IP address to a hostname or subdomain.Usally automatically created

CNAME = Canonical name, a CNAME record refereces another record, effectivley making it an alias, normaly used to map a subdomain to an existing domain.

MX = Mail exchanger, an MX record specifies a mail server for the domain, normaly more than one will be specified and they will be given a priority to denote which server to try first (for backup mail servers etc)

NS = Name server, an NS record lists the DNS servers responsible for the domain, again more than one can and normaly is provided so if the primary server fails a backup can be used.

PTR = Pointer, a PTR record is used to resolve an ip address to a name, PTR records are what make reverse lookups work.

SOA = Start of authority, a SOA record contains a lot of the basic information about the domain relating to how updates should be handled, primary name server and contact detail.



- = SOA record = -
-------------------
@ IN SOA ns0.example.com. hostmaster.example.com. (
2005081701 ; Serial
10800 ; Refresh
3600 ; Retry
3600000 ; Expire
86400 ) ; Minimum

- = MX Record2 = -
-------------------
MX 5 mx1.example.com.
MX 5 mx2.example.com.

- = NS Records = -
------------------
IN NS ns0.example.com.
IN NS ns1.example.com.

- = A Records = -
----------------
@ IN A 9.8.7.6
cvs IN A 8.8.8.8

These effectivley map example.com to 9.8.7.6 and cvs.example.com to 8.8.8.8.

It's worth noting this a record is special since the "@" means all destinations not setup in the zone file for this domain goto this, this is effectivley the "base" level of the dns.

- = CNAME Record = -
----------------------
www IN CNAME example.com.

This maps the www subdomain (yes, it is actualy a subdomain :O) to example.com, any changes made to the record for example.com automaticly filter back to www, www.example.com will go to 9.9.9.9, subdomains can basicly be pointed anywhere you want to point them

I've not listed a PTR record in this zone file because well, it wouldnt go in one, the PTR records would go into a zone file for the IP range as oppsed to the hostname, such a file would be named 777.888.999.in-addr.arpa and the PRT records would be specified using the last octet.

So for example.com we'd have a PTR record like this

6 IN PTR example.com.