What is domain name system (DNS) and how does domain name system work?
Domain Name System (DNS) is an application layer protocol typically used to translate domain names or hostnames into IP addresses and vice versa. Furthermore, DNS is a decentralized naming system that translates or maps human-readable domain names to their corresponding IP addresses and back. DNS is important component that facilitates the ability to scale networking architectures efficiently and effectively.
All computer systems on the Internet find and communicate with one another through numeric values known as IP addresses. And it is sometimes dubbed as the phonebook of the Internet by computer scientists. Moreover, web browsers establish sessions with computer resources deployed somewhere in cloud environments and on-premise datacenters through IP address. Besides, DNS translates hostnames to IP addresses so that the browsers can retrieve and load the resources hosted on the Internet. In addition, each device connected to the Internet possesses a unique IP address so that other machines can use it to find the device to transfer resources across the platforms. Furthermore, DNS servers eliminate the need for humans to memorize IP addresses (IPv4) or more complex newer alphanumeric IP addresses (IPv6).
There are four DNS servers that are employed in loading a webpage hosted somewhere in the clouds or datacenters.
- DNS Recursor: a server that responds to a recursive request from a client workstation and takes the time locate the DNS record.
- Root Nameserver: the first step in mapping human readable hostnames into IP addresses.
- TLD (Top Level Domain) Nameserver: The next step in the search of a specific IP address and it contains the last portion of the hostname.
- Authoritative Nameserver: a server that actually holds DNS resource records
There are three types of DNS queries, namely:
- Recursive query: a 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 cannot find the record.
- Iterative query: a DNS client will allow a DNS server to return the best answer it can retrieve.
- Non-recursive query: occurs when a DNS resolver client queries a DNS server for a resource record that it has access to either because it is authoritative for the records or the records that exist inside of its cache.