Tuesday, 22 November 2016

DNS

  • DNS stands for domain name system.
  • DNS is a hierarchical naming system for computers, services or any resource connected to the internet or a private network.
  • DNS is used to give human readable host names like www.netregistry.com to machine readable IP addresses like 204.13.248.115.
  • DNS is like a phone book for the internet. If you know a person’s name but don’t know their telephone number, you can simply look it up in a phone book. DNS provides this same service to the internet.


Working of DNS

1. Request information
  • The process begins when you ask your computer to resolve a hostname.
  • The first place your computer looks is its local DNS cache in recently retrieved.
2. Ask the recursive DNS servers
  • If the information is not stored locally, your computer contacts your ISP’s recursive DNS servers.
  • Recursive servers have their own caches, so the process usually ends here and the information is returned to the user.
3. Ask the root nameservers
  • If the recursive servers don’t have the answer, they contact the root nameservers.
  • A nameserver is a computer that answers questions about domain names, such as IP addresses.
4. Ask the TLD nameservers
  • The root nameserver will look at the first part of our request, reading from right to left   and direct our query to the top-level domain (TLD) nameservers for .com.
  • Each TLD, such as .com, .org, and .us, have their own set of nameservers, which act like a receptionist for each TLD.
  • These servers don’t have the information we need, but they can refer us directly to the servers that do have the information.
5. Ask the authoritative DNS servers
  • These authoritative nameservers are responsible for knowing all the information about a specific domain, which are stored in DNS records.
6. Retrieve the record
  • The recursive server retrieves the record from the authoritative nameservers and stores the record in its local cache.
7. Receive the answer
  • Recursive server returns the  record back to your computer.
  • Your computer stores the record in its cache, reads the IP address from the record, then passes this information to your browser.
  • The browser then opens a connection to the webserver and receives the website.


Advantages of DNS

  • No need to memorize numbers.
  • Domain names gives a kind of sense to hyper links when a name is given instead of a string of numbers.
  • Easy for categorizing, archiving and to extent search engines.
  • Automatic correction types.

Disadvantages

  • Hierarchical and centralized which breaks down the main objective of internet which is designed to be a decentralized system.
  • Spoofing DNS would lead to lot of crucial/private data ending up in wrong hands.

Primary vs Secondary DNS

Primary DNS Secondary DNS
A primary DNS server is responsible for reading data related to the domain zone. It is responsible for obtaining zone data from the primary DNS server immediately after being set up.
The primary server is also responsible for communicating with the secondary server. Each time a secondary DNS server functions it receives information from the primary DNS server.
Primary DNS servers creating, maintaining and updating the zone file. The secondary DNS servers neither create nor update the zone files.

No comments: