Friday 22 January 2016

Domian Naming System


Introduction:

  • Used to resolve human readable hostnames(www.google.com) to machine-readable IP addresses(204.13.248.115).
  • Provides information about domain name such as mail services.


Why is DNS important?

  • DNS is like a phone book for Internet.
  • DNS matches domain names to thier respective IPs on internet.
  • When a URL is entered in browser, CPU uses DNS to retrieve the website's IP address.
  • IP address, instead of domain name is used to access webpage, if there is no DNS.



                                  



 How does DNS work?

  • While accessing a website, computer follows a series of steps for turn a domain name into IP address.
  • This process is common every time you use a domain name.



Step 1: Request information

  • Request is sent to the CPU with the domain name.
  • It looks at local DNS cache, which stores the recently retrieved information.
  • Otherwise transfers to DNS Server in the form of query.

Step 2: Ask the recursive DNS servers

  • CPU sends a query to DNS server of Internet Service Provider which are called as Recursive servers.
  • Recursive servers also have DNS cache which can also used to store rescent information.
  • If not, then they query root name servers.

Step 3: Ask the root nameservers

  • Name server is a computer answers about domain names and IP addresses.
  • 13 root nameservers act as a telephone switchboard for DNS.
  • They don't know answer, but can redirect to the one who know where to find the answer.

Step 4: Ask the TLD nameservers

  • Root nameservers direct the query to Top Level Domains(TLD).
  • TLD servers don't have the information needed but refer to server that knows information.
  • Example of TLDs are .com, .in, .us, .gov, .org etc.,

Step 5: Ask the authoritative DNS servers

  • Authoritative nameservers are responsible for knowing all the information about specific domain.
  • Data is stored in the form of DNS records.
  • Records store information can be of any type, but requested information (IP address) is sent.

Step 6: Retrieve the record

  • Recursive server retrieves record and stores in its local cache.
  • If another request for same website(google.com) is recieved, then again no need to go through this process again.
  • Records have a time-to-live period(same as expiration date) to be in cache.

Step 7: Receive the answer

  • Recursive server returns record to requested computer CPU.
  • Then CPU stored the record in its Cache and reads the IP address from the record and passes to browser.
  • Browser opens connection to webserver and retrieves the webpage.

This entire process, from start to finish, takes only milliseconds to complete.




1 comment: