Introduction

  • DNS stands for “Domain Name System”.
  • All the websites on the Internet have unique names associated with them called domain names. Thus, to launch a website, we must have a unique domain name. To avoid any conflict within the names of the websites the concept of domain names was developed.
  • Way back in the ARPANET era, there was simply a file, called hosts.txt that listed all the hosts and their IP addresses. Every night, all the hosts would fetch it from the site at which it was maintained. For a network of a few hundred large timesharing machines, this approach worked reasonably well. However, when thousands of minicomputers and PCs were connected to the net all the time, then the size of the files would become too large, and even more importantly, hostname conflicts would occur constantly unless names were centrally managed, something unthinkable in a huge international network due to the load and latency. Managing a large and constantly changing set of domain names is a nontrivial problem. To solve these problems, DNS (the Domain Name System) was invented.

Definition

  • DNS is a hierarchical, domain-based naming scheme and a distributed database system for implementing this naming scheme. It is primarily used for mapping host or domain names and e-mail destinations to its given related IP addresses.

Features

  • DNS is one of the unique services that uses both TCP and UDP in their processing i.e. TCP is used when zone exchanged and UDP is used by DNS when resolving a hostname.
  • Domain names are essential components of the internet, helping users access websites and services by translating human-readable names (like example.com) into IP addresses.
  • The Domain Name System distributes the responsibility for assigning domain names and mapping them to IP networks by allowing an authoritative name server for each domain to keep track of its own changes, avoiding the need for a central register to be continually consulted and updated.
  • In a DNS, each domain is named by the path upward from it to the (unnamed) root. The components are separated by periods (pronounced ”dot”). Domain names can be either absolute or relative. An absolute domain name always ends with a period (e.g., eng.sun.com.), whereas a relative domain name does not. Relative names have to be interpreted in some context to uniquely determine their true meaning. In both cases, a named domain refers to a specific node in the tree and all the nodes under it.
  • Domain names are case insensitive, so edu, Edu and EDU mean the same thing. Component names can be up to 63 characters long, and full path names must not exceed 255 characters.

Types/Category of Domain Name

  • There are several types of domain names categorized based on their structure, purpose and the specific domain extensions they use.
  • A domain name generally can be categorized into –

(A) Top Level Domain(TLD) 

    • The Top-Level Domain is the highest level of a domain name, appearing after the last dot in a web address.
    • They are further sub-categorized into –
(a) Generic Top-Level Domains (gTLDs)/Generic Domain Name
      • These domain are commonly used and not restricted to any specific group or purpose.
      • Some original Generic domain names are – 
        • .gov – represents government agencies
        • .net – represents network organizations
        • .org – represents non-profit organizations
        • .edu – represents educational organizations
        • .com – represents commercial organizations
        • .mil – represents military or defense agencies
        • .info – represents Information Service Provider agencies
        • .arpa – represents ARPA agency
      • In November 2000, ICANN approved four new, general-purpose, top-level domains, namely, .biz (for businesses), .info (for information), .name (for people’s names), and .pro (for professions, such as doctors and lawyers). In addition, three more specialized top-level domains were introduced at the request of certain industries. These are .aero (for the aerospace industry), .coop (for co-operatives), and .museum (for museums). Other top-level domains will be added in the future.
(b) Sponsored Top-Level Domains (sTLDs)
      • These domains are restricted to specific organizations or industries, often requiring verification before registration.
      • Examples are : .edu (educational institutions), .gov (government agencies), .mil (military), .museum etc.
(c) Country Code Top-Level Domains(ccTLDs)/Country Domain Name
      • The country domains include one entry for every country, as defined in ISO 3166.
      • These domain names are denoted by two letters of the country name or geographic regions, such as .in (for India), .us (for America), .au (for Australia), .jp(for Japan), .nl(for Netherlands), etc.
      • Some common country domain names are – 
        • .in – represents Indian country
        • .au – represents Australian country
        • .us – represents American country
        • .uk – represents Great Britain country
        • .ca – represents Canada Country
        • .jp – represents Japan Country
(d) New Generic Top-Level Domains (nTLDs)
      • These are newer sets of domains introduced to expand the domain space, often more descriptive and cheap.
      • Examples are : .tech, .shop, .blog, .app, .xyz, .guru etc.

(B) Second-Level Domain (SLD) [Sub-domain]

    • The Second-Level Domain is the part of a domain name that comes immediately before the Top-Level Domain.
    • This part is typically where businesses, organizations, or individuals register their unique domain names.
    • For example, in example.com, “example” is the second-level domain.

(C) Third-Level Domain (Sub-Sub-domain)

    • The Third-Level Domain, often called a sub-sub-domain, appears before the second-level domain and TLD.
    • Subdomains are often used to organize different sections of a website or to point to specific servers.
    • Example: blog.example.com, where “blog” is the third-level domain or subdomain.

(D) Internationalized Domain Name (IDN)

    • An Internationalized Domain Name allows domain names to include characters from non-Latin scripts like Chinese, Arabic, Cyrillic, or accents used in various languages.
    • Example: 例子.中国 (Chinese for example.cn).
    • IDNs enable users from around the world to register and use domain names in their native language scripts.

(E) Hybrid/Mixed Domain Name :

    • This domain is a special case of Second-Level Domain.
    • In some countries, SLDs may reflect geographic areas or purposes.
    • A Hybrid Domain Name typically refers to a domain name that integrates different naming conventions, protocols, or network environments. While it’s not a standard term in domain name systems (DNS), “hybrid domain name” can imply a domain name that spans multiple technologies or is used across different contexts.
    • Organizations might set up hybrid names to integrate services accessed internally and externally with different domain suffixes, making the system more flexible across different environments.
    • For example – 
      • .co.in (combination of Commercial entities in India)
      • co. uk (commercial entities in the UK)
      • edu.au (educational institutions in Australia)
      • gov. in (government institutions in India)

(F) Other Domain Names

    • Reserved or Infrastructure Domains
      • These domain names are reserved for special uses by the Internet Assigned Numbers Authority (IANA) and cannot be registered by others.
      • These Domains are reserved for special purposes.
      • Examples include:
        • .example: Reserved for use in examples and documentation.
        • .localhost: Reserved for use to refer to the local computer.
        • .test: Reserved for testing purposes.
    • Premium Domain Names
      • Premium Domains are domain names that are more valuable due to their short length, common word usage, or high market demand. Often, these domains are already registered and sold at higher prices.
      • These domains are High-demand domains sold at a premium price.
      • Example: business.com, shop.com.
    • Expired or Dropped Domains
      • Expired Domains are domains whose registrations have not been renewed, making them available for others to register.
      • Dropped Domains refer to domains that were once registered but have been deleted from the registry after expiration.
    • Blockchain Domains
      • These are decentralized domain names not governed by the traditional DNS system but instead built on blockchain technology.
      • These domains are censorship-resistant and often used for decentralized applications (dApps) and cryptocurrency transactions.
      • Examples:
        • .eth (Ethereum Name Service)
        • .crypto (Unstoppable Domains)
    • Branded Domain Names
      • These domain names often reflect the name of a branded business, product, or organization.
      • Example: amazon.com, google.com.
    • Parked Domains
      • Parked Domains are domains that have been registered but do not have a website associated with them yet.
      • They often display placeholder pages or are held for future development or sale.
      • These domains are registered but undeveloped domains as underconstruction.com (with a placeholder page).

Structure of DNS

The DNS has the following major components :-

(A)Resolver : 

  • DNS resolvers are an essential part of how the internet functions, efficiently mapping domain names to the IP addresses that computers use to communicate.
  • A DNS resolver (Domain Name System resolver) is a critical component of the DNS infrastructure that helps convert human-readable domain names (like example.com) into its respective IP addresses (like 192.0.2.1), which are necessary for computers to communicate with each other over the internet.
  • The DNS resolver acts as an intermediary between users (or client devices) and the DNS system. When we type a URL into the browser, the resolver initiates the process of translating that human-readable domain name into its respective IP address. It performs this by querying various DNS servers until it finds the answer.
  • Types of Resolver Queries: There are the following types of Queries applied/used during DNS resolution by the Resolver –
    • Recursive Query:
      • In a recursive query, the client asks the DNS resolver to return either the final IP address or an error message (if the domain cannot be resolved). The resolver takes on the responsibility of querying all necessary servers.
    • Iterative Query:
      • In an iterative query, the resolver may return a referral to another DNS server (e.g., root server to TLD server), and the client continues the querying process on its own.
      • This approach is less common in everyday browsing but may be used in certain specialized networks.
    • Non-Recursive Query:
      • A non-recursive query occurs when the resolver already has the answer cached, so it directly returns the IP address without needing to query any other servers.
  • Types of DNS Resolver:
    • Public DNS Resolvers:
      • Public DNS resolvers are provided by organizations like Google DNS (8.8.8.8), Cloudflare (1.1.1.1), and OpenDNS (208.67.222.222).
      • They are often faster and more secure than ISP-provided resolvers.
    • Private DNS Resolvers:
      • These are DNS resolvers set up within a private network, typically in businesses or local environments, where DNS resolution is managed internally.
  • DNS Resolver Security Concerns
    • DNS Spoofing (Cache Poisoning):
      • In this case, attackers can try to inject false DNS data into a resolver’s cache, causing users to be redirected to malicious websites.
    • DNSSEC (DNS Security Extensions):
      • To combat DNS spoofing, DNSSEC provides a way for resolvers to verify that DNS responses are authentic, by adding digital signatures to the DNS records.
    • DNS over HTTPS (DoH) and DNS over TLS (DoT):
      • These protocols encrypt DNS queries, improving privacy and security by preventing DNS-related eavesdropping or manipulation by malicious actors.

(B) Domain Name Space :

  • The Domain Name Space is a hierarchical structure within the Domain Name System (DNS) that organizes and manages domain names in a structured way.
  • It helps map domain names to IP addresses, allowing users to easily access websites and services on the internet.
  • The domain name space is structured like an inverted tree, where the root is at the top, and beneath it, various levels of domain names branch out.
  • Conceptually, the Internet is divided into over 200 top-level domains, where each domain covers many hosts. Each domain is partitioned into subdomains, and these are further partitioned into sub-subdomains, and so on. All these domains can be represented by a tree structure. The leaves of the tree represent domains that have no subdomains. A leaf domain may contain a single host, or it may represent a company and contain thousands of hosts.

(C) Name Servers :

  • Name servers are critical components of the DNS resolution process, which takes place when a user enters a domain name into a browser.
  • Name Servers are DNS servers responsible for translating domain names into IP addresses.
  • Name servers in DNS (Domain Name System) are specialized servers responsible for translating human-readable domain names (like example.com) into machine-readable IP addresses (like 192.0.2.1).
  • They are an essential part of how DNS functions, ensuring that when a user types a URL into their browser, the browser knows where to find the corresponding server that hosts the website.
  • Name servers store DNS records for domains, including the IP addresses associated with those domains. When a DNS query is made, the name server responds with the necessary information, such as the IP address of the requested domain.
  • Name Server Delegation: When a domain is registered, the domain owner specifies which authoritative name servers are responsible for that domain. This is called delegation.
  • Types of Name Servers:
Name Servers are of the following types –
    • Root Name Servers:
      • Root name servers are the first step in translating domain names to IP addresses. They do not contain the full IP address but know which TLD name server to query next.
      • There are 13 sets of root name servers, identified by letters (e.g., A.root-servers.net to M.root-servers.net), distributed globally to ensure availability.
    • TLD Name Servers:
      • TLD name servers manage specific Top-Level Domains (e.g., .com, .org, .net, .uk, .jp).
      • They direct queries to the authoritative name servers for individual domains within their TLD.
    • Authoritative Name Servers:
      • The authoritative name server has the final answer, storing the DNS records for the domain. It provides the IP address for example.com, which the resolver passes back to the user’s device, allowing the browser to connect to the correct server and load the website.
      • These are the name servers that hold the actual DNS records for a domain (e.g., example.com).
      • They provide the final answer to DNS queries, including the A record (IPv4 address) or AAAA record (IPv6 address) that maps the domain to its IP address.
      • During DNS resolution, If the resolver doesn’t have the IP address cached, it queries various name servers (starting with the root name server, then moving to TLD name servers, and finally authoritative name servers).
      • Example: When querying example.com, the authoritative name server for example.com will provide the IP address.
    • Recursive (Caching) Name Servers:
      • Although not specifically name servers in the traditional sense, recursive DNS resolvers (also known as caching name servers) are often the first point of contact in the DNS resolution process.
      • These resolvers cache DNS query results, reducing the time needed to resolve subsequent queries for the same domain.
  • Public vs. Private Name Servers
    • Public Name Servers:
      • These are name servers provided by third-party services or organizations.
      • They are used by ISPs, organizations, or individuals to perform DNS lookups.
      • Examples:
        Google Public DNS: 8.8.8.8 and 8.8.4.4
        Cloudflare DNS: 1.1.1.1
        OpenDNS: 208.67.222.222 and 208.67.220.220
    • Private Name Servers:
      • These are DNS servers set up by organizations or hosting providers for internal use or for managing their own domains.
      • Example: A company might set up its own private name servers to handle internal domain resolution for its corporate network.
  • Types of DNS Records Stored on Name Servers :
Name servers hold various types of DNS records that provide different kinds of information about a domain. Common DNS records include:
    • A Record (Address Record):
      • It maps a domain to an IPv4 address.
      • Example: example.com → 192.0.2.1.
    • AAAA Record:
      • It maps a domain to an IPv6 address.
      • Example: example.com → 2001:db8::1.
    • CNAME Record (Canonical Name Record):
      • It maps a domain name to another domain name (alias).
      • Example: www.example.com → example.com.
    • MX Record (Mail Exchange Record):
      • It specifies the mail server responsible for receiving email for the domain.
      • Example: example.com → mail.example.com.
    • NS Record (Name Server Record):
      • It specifies which name servers are authoritative for a domain.
      • Example: example.com → ns1.example.com, ns2.example.com.
    • TXT Record (Text Record):
      • It stores arbitrary text data, often used for verification or security purposes (e.g., SPF records for email authentication).
      • Example: example.com → “v=spf1 include:_spf.google.com ~all”.

      Working Mechanism/DNS Resolution Process

      • There are following steps occur during DNS functioning/processing –
        • Querying the DNS Resolver:
          • When we enter certain URLs such as www.example.com into the browser, the operating system sends a DNS query to the recursive DNS resolver (usually a resolver provided by our Internet Service Provider (ISP), a public DNS resolver like Google’s 8.8.8.8, or our local network’s resolver).
        • Checking Cache:
          • The recursive DNS resolver first checks its cache to see if it has a recent answer to the query. If it has recently used/resolved the IP address for www.example.com, it will return the cached result, which saves time. If the recursive resolver doesn’t have the requested IP address in its cache.
        • Query to Root Server:
          • If the recursive resolver doesn’t have the requested IP address in its cache, it contacts one of the root DNS servers. Root servers do not know the answer but direct the resolver to a Top-Level Domain (TLD) DNS server.
        • Query to TLD Server:
          • The recursive resolver contacts the TLD DNS server (e.g., .com, .org, .net). The TLD server also may not have the answer but will direct the resolver to the authoritative DNS server for the respective domain. It is an Iterative and Recursive Queries.
        • Query to Authoritative DNS Server:
          • The authoritative DNS server has the exact answer for the requested domain (e.g., example.com) and returns the corresponding IP address to the recursive resolver finally.
        • Return the IP Address:
          • The recursive resolver sends the IP address back to the client, which can now connect to the website or service.
        • Caching:
          • The DNS resolver typically caches this IP address for future requests, reducing the time and number of queries for subsequent users requesting the same domain.
        • In Summary, To map a domain name onto an IP address, an application program calls a library procedure called the RESOLVER, passing the name as a parameter. The resolver sends a UDP packet to a local DNS server, which then looks up the name and returns the IP address to the resolver, which then returns it to the caller. Armed with the IP address, the program can then establish a TCP connection with the destination or send it UDP packets.

      Functions

      • The most basic task of DNS is to translate host or human-readable domain names to its given respective IP addresses.
      • DNS makes it possible to assign Internet names to organizations (or concerns they represent) independent of the physical routing hierarchy represented by the numerical IP address.
      • One of the main tasks of a DNS resolver is caching. Once a DNS resolver has successfully queried an IP address, it stores the result for a certain time-to-live (TTL) period, allowing future queries for the same domain to be resolved more quickly without contacting external servers. The TTL is set by the authoritative DNS server for the domain.

      Loading


      0 Comments

      Leave a Reply

      Your email address will not be published. Required fields are marked *

      This site uses Akismet to reduce spam. Learn how your comment data is processed.