DNS (Domain Name System)

DNS (Domain Name System) is just like address book of internet. Each domain has unique + static IPaddress in internet. It eliminates humans to memorize IP address of server (it's easy to memorize omniguru.in rather than IP address like
DNS consists many domain name servers and provides name-to-IPAddress mapping for registered servers.
URL structure: https://telugu.OmniGuru.in

DNS Server types

DNS Server performs forward NS lookup & reverse NS lookup. Forward DNS Lookup is resolving a host name to IP address. Reverse DNS lookup is resolving IP address to host name.
Type Description
[1] DNS Resolver Acts as middleware between client & DNS nameserver.aka recursive resolver.
Get DNS query from client, if it has cache for that query, will send cache data.
Otherwise [1] <=> [2], [1] <=> [3], [1]<=> [4].
Then save data in cache and send it to client.
[2] Root Nameservers It responds by pointing the DNS resolver to a TLD NS.
*racks of books
[3] TLD Nameservers It responds by pointing to the authoritative NS.
E.g. .com, .in
omniguru.in will be in .in TLD NS.
*specific rack
[4] Authoritative NS Provides IP address of domain from DNS records.
*dictionary of rack

DNS Records

DNS records also known as Zone files

Common DNS record types

Record Type Description
A contains IP address of a domain
CNAME Canonical name forwards one domain or subdomain to another domain, No IP address.
DNAME Delegate name record creates a domain alias, like CNAME, but it will redirect all subdomains also.
MX Mail exchanger directs mail to an email server
NS Name server record stores the name server for a DNS entry.
TXT Admin can store text notes in the record.
SOA Start of authority record stores admin information about a domain.
SRV Service record specifies a port for specific services.
PTR Pinter record provides a domain name in reverse-lookups.


  • DNS database contains name server records, host-name-to-address records, host-name-aliases records.
  • The 3 strategies for updating DNS servers are dynamic, read-write, and read-only
  • The entire hostname has a maximum of 255 characters
  • Basic function of NS lookup program is to probe the DNS database for various types of information.
  • /etc/resolv.conf is the name of DNS client configuration file and does the nslookup program to locate a name server.
  • /etc/hosts file resolves hostname to IP addresses locally.
  • A record is most common used record type out of all DNS records.