My personal notes
T

DNS

DNS stands for Domain Name System, which is the phonebook of the Internet. It is a network service that converts between human-readable domain names (such as www.example.com) and machine-friendly IP addresses (such as 192.168.1.1) that browsers use to load web pages.

DNS works by following a series of steps to translate a domain name into an IP address. When a user types a domain name into their web browser, a DNS query is sent to a DNS server, which is a computer that stores a database of domain names and their corresponding IP addresses. The DNS server then performs a lookup process to find the right IP address for the domain name.

The lookup process involves four types of DNS servers:

  • DNS recursor: This is the server that receives the query from the user's device and communicates with other DNS servers to find the answer. It can be thought of as a librarian who is asked to find a particular book in a library.
  • Root nameserver: This is the server that is responsible for the root zone of the DNS hierarchy, which contains information about the top-level domains (TLDs) such as .com, .org, .net, etc. It can be thought of as an index in a library that points to different racks of books.
  • TLD nameserver: This is the server that hosts the information about the second-level domains (SLDs) within a TLD, such as example.com, google.com, nytimes.com, etc. It can be thought of as a specific rack of books in a library.
  • Authoritative nameserver: This is the server that has the final and definitive answer to the DNS query, which is the IP address of the requested domain name. It can be thought of as a dictionary on a rack of books, where a specific name can be translated into its definition.

The DNS recursor initiates the lookup process by sending a query to one of the root nameservers, which responds with a list of TLD nameservers for the requested TLD. The DNS recursor then sends another query to one of the TLD nameservers, which responds with a list of authoritative nameservers for the requested SLD. The DNS recursor then sends a final query to one of the authoritative nameservers, which responds with the IP address of the requested domain name. The DNS recursor then returns this IP address to the user's device, which can then use it to access the web page.

DNS is an essential component of the Internet, as it allows users to access websites using easy-to-remember domain names instead of complex IP addresses. It also enables website owners to change their IP addresses without affecting their users, as they only need to update their authoritative nameservers with the new IP address . Additionally, DNS can provide other functions such as load balancing, security, and content delivery.

Show Graph Visualisation