Day-13: DHCP & DNS.

By | May 20, 2022

DHCP stands for Dynamic Host Configuration Protocol. This protocol is used to assign the IP address dynamically to devices on a network. DHCP also assigns the subnet masks, default gateway, and DNS IP addresses. We can configure the DHCP server to a Router or a computer can be configured as a DHCP server.|

How Does DHCP Work?

Instead of manually assigning IP addresses (subnet mask, default gateway, DNS addresses), it is easier to have IP addresses assigned automatically.

The DHCP server requires a block of IP addresses, called an address pool, is used for assigning to the DHCP clients on a network.

A DHCP Server must be pre-configured with a range (scope) of IP addresses.

As clients come online they contact the DHCP server and request an address and the DHCP server chooses an address from the configured pool and allocates it to that host.

Clint PC must be configured as Obtain an IP address automatically.

DNS(Domain Name System)

The domain name system(DNS) is responsible for translating domain names into a specific IP address so that the initiating client can load the requested Internet resources. The domain name system works much like a phone book where users can search for a requested person and retrieve their phone number. DNS servers translate requests for specific domains into IP addresses, controlling which server users access when they enter the domain name into their browser.

A DNS server stores specific information that pairs a domain name with particular IP addresses. A domain may have one or hundreds of IP addresses associated with it., for example, has thousands of servers across the globe, and the physical server that a user connects to within one country is likely completely different from another user elsewhere around the world. The global nature of Internet services requires a network of distributed and scalable DNS servers to ensure that users can quickly look up and resolve the requested server’s location, wherever they are around the globe.

The purpose of DNS is to translate a domain name into the appropriate IP address. This is done by looking up the DNS records of the requested domain. There are typically eight steps in this DNS lookup process that follow the information path from the originating web browser to the DNS server and back again. In practice, DNS information is often cached to reduce the DNS lookup response time. When the DNS information is not cached, the eight-step lookup process is as follows:

How DNS Lookup Happens

  1. A user enters a domain name (e.g., into their browser, and the browser sends the query via their internet service provider ISP to a DNS recursive resolver.
  2. The DNS recursive resolver, in turn, sends a query to the root DNS nameserver (.).
  3. The root server returns to the resolver the address of the top-level domain (i.e., “TLD”) DNS root server, which has the needed information for the domain. (Examples of a top-level domain TLD include “.com”, “.net”, and “.org,” which each TLD has its own root DNS server.)
  4. In turn, the resolver then sends the information request to the Top-Level Domain server (In this case, the “.com” TLD nameserver).
  5. The TLD name server responds to the resolver with the targeted IP address of the domain’s nameserver. (In this case, the DNS server for “”.)
  6. Next, the DNS recursive resolver sends the query to the domain’s DNS server.
  7. The domain’s DNS server then returns the IP address to the DNS resolver for the requested domain (e.g., “”.
  8. Finally, the DNS resolver returns the IP address of the requested domain to the requesting web browser. The browser sends the HTTPS request to the targeted IP address, and the server with that address returns the webpage, which renders in the user’s browser.

 Domain Name System (DNS) Hierarchy.

DNS hierarchy has the following elements:

  1. Root Level/zone servers
  2. Top-Level Domains
  3. Second-Level Domains
  4. Sub-Domain.


DNS is basically a resolver from name to IP and IP to name, DNS works on layer 7.

For example, you have a website called and you as an end-user know the name of that website but you don’t know the IP address of this user. in that case, you will have to use the DNS server for resolving that domain name to the IP address. Let’s see, What is the IP address of

NS Lookup toll in Windows.

When you will enter the name of the website in your browser, Your computer is going to convert that name to IP . And that is being done by your DNS server. So whatever the DNS you have entered the computer will resolve the name by the DNS server.

Leave a Reply

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