What is DNS?

  • DNS recursor: which is also referred to as a DNS resolver, receives query from the DNS client and then, it communicates with other DNS servers to find right IP.
  • Root nameservers: answer requests sent to it for records in the root zone. It answers requests by sending back a list of authoritative nameservers that go with the correct TLD.
  • TLD nameservers: The top level domain server keeps the IP address of the second level domain contained within the TLD name. TLD devide into 2 types: ccTLD — CountryCode TLD (e.g. VietNam is .vn, England is .ek) and gLTD — Generic TLD (e.g. .com for commercial organizations).
  • Authoritative nameservers: know all information related to specific domain by storing DNS records (DNS Resource Record — RR). It gives you the real answer to your DNS query.
  1. End-user uses browser, enter www.nquang.com. The request is routed to a DNS Resolver, , which is typically managed by the user’s Internet service provider (ISP).
  2. DNS Resolver forwards the request www.nquang.com to a DNS Root Nameserver.
  3. DNS Resolver forwards the request www.nquang.com again, this time to one of the TLD name servers for .com domain. The TLD server then responds with the IP address of the domain’s nameserver.
  4. DNS Resolver send a query to the domain’s nameserver.
  5. Then, the IP address for nquang.com is then returned to the resolver from the nameserver.
  6. The DNS resolver then responds to the web browser with the IP address of the domain requested initially.
  7. Browser make a HTTP rẻquest to the IP address.
  8. The server at that IP returns the webpage to be rendered in the browser.
  • Recursive query: DNS client requires that a DNS server will respond to the client with either the requested resource record or an error message if the resolver can’t find the record.
  • Iterative query: DNS client will allow a DNS server to return the best answer it can.
  • Non-recursive query: this will occur when a DNS resolver client queries a DNS server for a record that it has access to either because it’s authoritative for the record or the record exists inside of its cache.
  1. A Record: mapping straight from a domain to an IP address.
  2. AAAA Record: similar to A Record, but used for IPv6.
  3. CName (Canonical Name)Record: contains the alias of a domain, which can also be understood as the mapping between one domain to another.
  4. NS (Name Server) Record: shows information about the domain nameservers. A domain will be managed by 2 servers, so there will be at least 2 NS records for each domain.
  5. MX (Mail Exchanger) Record: shows information about the Mail Server for a certain domain.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store