TCP/IP networks used to use hosts files to resolve IP addresses to host names or domain names. Networks began growing to the point where the administration and the traffic needed to maintain this file became unbearable and DNS was born. A DNS client(aka resolver) sends requests to the DNS nameserver which responds with the requested info, another server to query or a failure message. This process is very similar to calling information. You call them with a name, they check their database and give you the phone number. There are a variety of roles a nameserver can satisfy within the zone that they are responsible for:
- Primary Nameserver – Gathers DNS information from local files and is a focal point for adding hosts and domains.
- Secondary Nameserver – Gathers the data for its’ zone(s) from another DNS server. Secondary nameservers provide redundancy, traffic on primary server and quicker access for locations that are remote in regards to the primary server.
- Caching Only Nameserver – These do not have a zone that they are responsible for. Their databases only contain info that is received from resolutions that it has made since the server was last started.
Nameservers are distributed into tiers called domains.
Microsoft discusses domains in terms of a hierarchical “domain name space” which they refer to as being like a tree structure. There are several different domain levels as listed below:
- Root level domains – The top of the tree.
- Top level domains – These are divided into different categories. Com, net, mil, edu, org and gov are the most common.
- Second level domains – These domains make up the rest of networks as all sub-domains are categorized under this heading. So if you visit Intel’s site, you are visiting the sub-domain intel.com. Within intel.com many other sub-domains may also exist.
- Hosts – Hosts are the final level in the hierarchy as they are the individual computers that occupy or comprise a domain.
Below are some of the common DNS records and their purpose:
- A – The A-record is used for hosts on a network. It is used to translate human friendly domain names such as “www.mcmcse.com” into an IP-addresses such as 184.108.40.206.
- CNAME – CNAME (canonical name) records are used to create aliases. Often computers on the Internet have multiple functions such as web server, FTP server, mail server etc. To mask this, CNAME-records can be used to give a single computer multiple names (aliases). For example computer “xyz.com” may be both a web-server and an ftp-server, so two CNAME-records are defined: “www.xyz.com” = “xyz.com” and “ftp.xyz.com” = “xyz.com”.
- MX – MX (mail exchanger) records identify mail server(s) responsible for a domain name. When sending an e-mail to “email@example.com”, your mail server must first look up the MX record for “xyz.com” to see which mail server actually handles mail for “xyz.com”.
- NS – NS (name server) records identify DNS servers responsible (authoritative) for a zone.
- PTR – PTR (pointer) records map IP addresses to domain names which is the reverse of A-records.