Domain Name System (DNS) Part 2

17 Mar 2019

This is the second part Domain Name System (DNS). Click here to see part 1.

DNS Server Hierarchy

Typically, there are three levels in the DNS server hierarchy

  1. Root DNS server: as of this writing, there are 13 root DNS servers, more here. These return IP addresses of top level domain DNS servers.
  2. Top level domain DNS server: these DNS servers are in charge of .com or .edu… top level domains. They return IP address of authoritative DNS servers.
  3. Authoritative DNS server:

    Every organization with publicly accessible hosts (such as Web servers and mail servers) on the Internet must provide publicly acces- sible DNS records that map the names of those hosts to IP addresses. An organiza- tion’s authoritative DNS server houses these DNS records. ~ The Power of Habit

DNS Resource Record

Resource records (RR) are hostname-to-IP address mappings that are stored in the DNS system.

Each RR contains four fields: Name, Value, Type, TTL.

There are 04 types of records. The following table summarises each record type and what kind of mapping it provides.

Record type Mapping
A hostname to IP address
CNAME alias hostname to canonical name
NS domain to hostname of authoritative DNS server
MS alias hostname to canonical mail server’s name

From The Power of Habit

If a DNS server is authoritative for a particular hostname, then the DNS server will contain a Type A record for the hostname.

If a server is not authoritative for a host- name, then the server will contain a Type NS record for the domain that includes the hostname; it will also contain a Type A record that provides the IP address of the DNS server in the Value field of the NS record.

Inserting Records into the DNS Database

In order to obtain a usable domain name, you need to register that domain at a registrar.

A registrar is a commercial entity that verifies the uniqueness of the domain name, enters the domain name into the DNS database (as discussed below), and collects a small fee from you for its services.

Registering a domain with a registra involving providing the name and IP address of your authoritative DNS servers. The registra will then make an NS record (domain -> authoritative DNS server’s hostname) and an A-type (DNS server’s hostname -> its IP address) in each of the corresponding top level domain DNS servers.