Domain Name System is the internet’s phone book. They translate website names into IP addresses so users don’t have to remember a bunch of numbers. Not only would it be difficult to remember each IP addresses, but they can change for each host. With Domain Name System, these changing IP addresses can be mapped to the same domain name.

DHCP

Dynamic Host Configuration Protocol (DHCP) is a network protocol used to automate the process of assigning IP addresses and other network configuration parameters to devices on a network.

DNS Flow

Domain Organization

DNS Record: DNS records store domain names, IP addresses, validity, time to live (TTL), and other information.

Namespace: An isolated instances of network environments that allow for the separation of network interfaces, routing tables, and other network resources

Nameserver: Nameservers main role is to tell DNS the internet where to find the domain’s IP address.

Root name servers: It is contacted by name servers that can not resolve the name.

Top-level Domain (TLD) Server: It is responsible for com, org, edu, etc, and all top-level country domains like uk, fr, ca, in, etc. They have info about authoritative domain servers and know the names and IP addresses of each authoritative name server for the second-level domains.

Authoritative Name Servers: An organization’s DNS servers, providing authoritative hostnames to IP mapping for organization servers.

DNS_2.png

The host requests the DNS name server to resolve the domain name. Then the name server returns the IP address corresponding to that domain name to the host so that the host can future connect to that IP address.

Flow

How-DNS-Works-gif-ezgifcom-optimize-1.gif

Example:

  1. A user types “example.com” into a web browser.

  2. The request goes to a DNS resolver.

  3. The resolver asks a root server where to find the top-level domain (TLD) server for .com.

  4. The root server tells the resolver to contact the .com TLD server.

  5. The resolver then asks the .com TLD server for the IP address of “example.com.”

  6. The .com TLD server gives the resolver the IP address of the domain’s nameserver.

  7. The resolver then asks the domain’s nameserver for the IP address of “example.com.”

  8. The domain’s nameserver returns the IP address to the resolver.

    Working-of-DNS.gif

Here is the list of main DNS servers involved in loading a webpage:

This hierarchical system of DNS servers ensures that when you type a domain name into your web browser, it can be translated into the correct IP address.

DNS Cache

**DNS Caching **can be simply termed as the process used by DNS Resolvers for storing the previously resolved information of DNS that contains domain names, and IP Addresses for some time.