DNS

What is DNS ?
  • The domain name system (DNS) is the way that internet domain names are located and translated into internet protocol (IP) addresses.
  • DNS server is used to translate human-memorable domain names like xyz and host names like support.xyz into the corresponding numeric Internet Protocol (IP) addresses as well as to recognize and discover computer systems and resources on the Internet.
  • We'll recognize domain names as having strings of characters separated by dots. 
  • The last word in a domain name represents a top-level domain. These top-level domains are controlled in Root Zone Database. The following are some common top-level domains :
    • COM -- commercial Web sites, though open to everyone.
    • NET -- network Web sites.
    • ORG -- non-profit organization Web sites, open to everyone.
    • EDU -- restricted to schools and educational organizations.
    • MIL -- restricted to the military.
    • GOV -- restricted to the government.
  • In a domain name, each word and dot combination we add before a top-level domain indicates a level in the domain structure.
  • Each level refers to a server or a group of servers that manage that domain level. For example, "stoneprofits" in our domain name is a second-level domain off the COM top-level domain. The left-most word in the domain name, such as www is a host name.

How DNS Works ?
  • The DNS database resides on a hierarchy of special database servers. When clients like Web browsers issue requests involving Internet host names, a piece of software  called the DNS resolver first contacts a DNS server to determine the server's IP address. 
  • If the DNS server does not contain the needed mapping, it will, in turn, forward the request to a different DNS server at the next higher level in the hierarchy.
  • Internet Service Providers (ISPs) maintain their own DNS servers and use DHCP to automatically configure their customer's networks.

Primary vs Secondary server :
  • A primary DNS server is responsible for reading data related to the domain zone. The primary server is also responsible for communicating with the secondary server.
  • In basic terms, when a request is issued to a server it travels through the primary DNS server, which then allocates functions to a secondary server.
  • A secondary DNS server, also commonly referred to as a slave server, is responsible for obtaining zone data from the primary DNS server immediately after being set up.
  • Secondary servers contain read-only copies of the zone file, and they get their info from a primary server in a communication known as a zone transfer. 
  • Each zone can only have one primary DNS server, but it can have any number of secondary DNS servers.
  • Secondary servers provide redundancy in case the primary DNS server goes down.