DNS - Domain Name System

The primary function of DNS is to resolve hostname to IP address. These hostname must be a part of a FQDN (Fully Qualified Domain Name). Example of FQDN are www.google.com, www.microsoft.com, news.google.com, mail.google.com where news and mail might refer to hosts that are a part of google.com domain.

The information about hostname and domains are stored on distributed database systems on public network such as Internet. Many types of information about the domain names such as IP address of each domain name, MX records (mail server), nameserver are stored in the DNS database. The DNS system provides with a friendly interface for data transmission. While computers use IP addresses to communicate with each other, humans find it easy to use domain names to access information on the Internet. It is easy for us to remember a domain name, email address instead remebering IP addresses of every website.

History of the DNS

The practice of using a name as a more human-legible abstraction of a machine’s numerical address on the network predates even TCP/IP, all the way back to the ARPAnet era. Originally, each computer on the network retrieved a file called HOSTS.TXT from SRI (now SRI International) which mapped an address (ex. 145.97.39.135) to a name (ex. www.google.com) The Hosts file still exists on most modern operating systems either by default or through configuration and allows users to specify an IP Address to use for a hostname without checking the DNS. This file is now used primarily for troubleshooting DNS errors or mapping local addresses to more organic names. Such a system had inherent limitations, because of the obvious requirement that every time a given computer’s address changed, every computer that wanted to communicate with it would need an update to its Hosts file.

The growth of networking called for a more scalable system: one which recorded a change in a host’s address in one place only. Other hosts would learn about the change dynamically though a notification system, thus completing a globally accessible network of all hosts names and their associated IP Addresses.

How DNS works?

The practical operation of the DNS system consists of three players:

  1. The DNS resolver, a DNS client program which runs on a user’s computer and generates DNS requests on behalf of software programs.
  2. The recursive DNS server, which searches through the DNS in response to queries from resolvers and returns answers to those resolvers; and,
  3. The authoritative DNS server which hands out answers to queries from recursors, either in the form of an answer, or in the form of a delegation (i.e. referral to another authoritative DNS server).

Understanding the parts of a domain name

A domain name usually consists of two or more parts, separated by dots.

The rightmost label conveys the top-level domain (also known as TLD) for example, the address networkguruz.com has the top-level domain com.

Each label to the left specifies a subdivision or subdomain of the domain above
it. Note that “subdomain” expresses relative dependence, not absolute dependence: for example, networkguruz.com comprises a subdomain of the com domain, and en.networkguruz.com could form a subdomain of the domain networkguruz.com (in practice, however, en.networkguruz.com actually represents a hostname - see below). In theory, this subdivision can go down to 127 levels deep, and each label can contain up to 63 characters, as long as the whole domain name does not exceed a total length of 255 characters. But in practice some domain registries have shorter limits than that.

Types of DNS records

Important categories of data stored in the DNS include the following:

  • An A record or address record maps a hostname to its 32-bit IPv4 address.
  • An AAAA record or IPv6 address record maps a hostname to its 128-bit IPv6 address.
  • A CNAME record or canonical name record makes one domain name an alias of another. The aliased domain gets all the subdomains and DNS records of the original.
  • An MX record or mail exchange record maps a domain name to a list of mail exchange servers for that domain.
  • A PTR record or pointer record maps an IPv4 address to the canonical name for that host. Setting up a PTR record for a hostname in the in-addr.arpa domain that corresponds to an IP address implements reverse DNS lookup for that address. For example (at the time of writing), www.icann.net has the IP address 192.0.34.164, but a PTR record maps 164.34.0.192.in-addr.arpa to its canonical name, referrals.icann.org.
  • An NS record or name server record maps a domain name to a list of DNS servers for that domain. Delegations depend on NS records.
  • An SOA record or start of authority record specifies the DNS server providing authoritative information about an Internet domain.
  • An SRV record is a generalized service location record.
  • A TXT record allows an administrator to insert arbitrary text into a DNS record. For example, this record is used to implement the Sender Policy Framework specification.

Other types of records simply provide information (for example, a LOC record gives the physical location of a host), or experimental data (for example, a WKS record gives a list of servers offering some well-known service such as HTTP or POP3 for a domain).


RELATED POSTS:

Comments are closed.