Untitled

Domain Name System translates domain name to IP address.

DNS is hierarchical, with a few authoritative servers at the top level. Your router or ISP provides information about which DNS server(s) to contact when doing a lookup. Lower level DNS servers cache mappings, which could become stale due to DNS propagation delays. DNS results can also be cached by your browser or OS for a certain period of time, determined by the time to live (TTL).

IPv4 32 Bits in Length while IPv6 are 128 bits in length.

The hierarchical naming structure of Domain Name System

The hierarchical naming structure of DNS forms an inverted tree, of which the root is denoted by character period (.), followed by multiple levels of domains. Like any other hierarchical tree structure, the root represents everything, and as we go from top to bottom, the scope becomes narrower, more specific.

Untitled

Details of the structure are as follows:

  1. The root is denoted by period (.), and it contains all domains, including all servers, client computers (desktop, laptop, mobile devices, etc.), and network devices on the Internet.
  2. Immediately after the Root is the Top Level Domains (TLDs), and some of the TLDs are .com, .net, .org, .gov, .edu, .info, etc. The TLD also has two character country code domain from ISO 3166 country code (for example, .ie for Ireland, .hk for Hong Kong, .np for Nepal, .ph for Phillippines, etc.).
  3. The second level domains are mainly organisational domains, such as microsoft, google, yahoo, mybusiness, maadis, etc., so these domains are owned by the organisations or individuals. The organisations and individuals register their chosen domains with Domain Name Registrars.
  4. The country code domains in TLD may take common TLD2 domains like .com, .net., .org, .gov, etc. as its second level domain. For example: .com.hk, .net.hk, .org.hk, etc. In this example, the country code, hk, is the TLD while .com is its second level domain.
  5. The Third Level Domains in the diagram represent the hostnames. As indicated above, a host can be a server, a client device, or a service (http, ftp, etc. )

Address Resolution Mechanism

  1. Network host is configured with an initial cache (hints) of the known addresses of the root name servers. If the host doesn't have any kind of entry in its host list then host consults with the configured DNS point.
  2. Resolution process starts with a query to one of the root servers. In typical operation, the root servers do not answer directly, but respond with a referral to more authoritative servers, e.g., a query for "www.wikipedia.org" is referred to the org servers.The resolver now queries the servers referred to, and iteratively repeats this process until it receives an authoritative answer.
  3. This mechanism would place a large traffic burden on the root servers, if every resolution on the Internet required starting at the root. In practice caching is used in DNS servers to off-load the root servers, and as a result, root name servers actually are involved in only a relatively small fraction of all requests.
  4. To Increase performance in end-user applications, the Domain Name System supports DNS cache servers which store DNS query results for a period of time determined in the configuration (time-to-live) of the domain name record in question.

DNS Resolvers

The client side of the DNS is called a DNS resolver. A resolver is responsible for initiating and sequencing the queries that ultimately lead to a full resolution. DNS resolvers are classified by a variety of query methods :

  1. *non-recursive query -* a DNS resolver queries a DNS server that provides a record either for which the server is authoritative, or it provides a partial result without querying other servers.