Cancel
https://media.fs.com/images/community/uploads/post/202105/27/post57-dns-vs-dhcp-lxbwgz0sxh.jpg

DHCP vs DNS: What Are They, What’s Their Differences?

August 17, 2018

The DHCP (Dynamic Host Configuration Protocol) and DNS (Domain Name System) are created to make it easy for us to use networks or the Internet. They are not competitor, but work with IP addresses in a different way. In this article, we will discuss general information about DHCP DNS meaning, how DHCP/DNS works and the differences between them.

DHCP vs DNS: What are they?

What is DHCP?

Dynamic Host Configuration Protocol DHCP is a network protocol that helps us to assign an IP address and related IP information to the devices such as servers, desktops, or mobile equipment in the network. Many network switches also apply DHCP to provide valuable TCP/IP network services, for example, it helps to automatically upgrade software on client systems.

DHCP networking

Figure 1: DHCP networking

DHCP Server---A DHCP Server is a network server that automatically provides and assigns IP addresses to client devices, sending the required network parameters for clients to properly communicate over the network. For larger networks, it is essential for DHCP servers assigning each client with a unique dynamic IP address, which changes when the client’s lease for that IP address has expired, otherwise the network administrator has to manually set up every client that joins the network.

DHCP Client---DHCP client could be a PC computer, mobile device, IoT endpoint or anything else that requires connectivity to the network, which are configured to receive DHCP information by default.

DHCP Relaying---DHCP relaying happens in a centralized DHCP servers instead of on each subnet. Usually, a router or host listens for client messages being broadcast on that network and then forwards them to a configured server. The server then sends responses back to the relay agent that passes them along to the client.

What is DNS?

Domain Name System (DNS) is used to convert a website name like FS.COM to its IP address and vice versa, making users connect to websites by matching human-readable domain names with the unique ID of the server.

DNS networking

Figure 2: DNS networking

DNS Servers and IP Addresses

Each domain can correspond to more than one IP address. In fact, some sites have hundreds or more IP addresses that correspond with a single domain name. For example, the server your computer reaches for www.fs.com is likely completely different from the server that someone in another country would reach by typing the same site name into their browser.

DHCP vs DNS: What are their differences?

DNS server is a device that locates the internet domain names and translates them into internet protocol (IP) addresses. In contrast, DHCP server is a device that dynamically assigns IP address and other network configuration parameters to each device on a network so that they can communicate with each other. To be clear, here uses a chart to conclude DHCP and DNS differences:

Parameters DHCP DNS
Basic A protocol for assigning IP address to the host statically or dynamically. An address resolving mechanism.
Related protocols UDP UDP and TCP
Server DHCP server is responsible for allocating the temporary addresses to the client computer for a lease time, and then extending the lease according to the requirement. DNS server is responsible for accepting the queries through client and responding back with the results.
Working methodology Centralized Decentralized
Features 1. Provide additional information such as IP addresses of the host and Subnet mask of the computer. 2. Assigns IP to host for a particular lease time. 1. Coverts symbolic names into IP address and vice-versa. 2. Used for locating active directory domain servers.
Advantage Reliable IP address configuration and reduced network administration. Eliminate the need to remember the IP address; instead, the domain name is used for the web address.

DHCP vs DNS: How do they work?

How DHCP Works

DHCP works by leasing IP addresses and IP information to network clients for a period of time. To achieve this, the DHCP client has to interact with DHCP servers through a series of DHCP messages, which mainly include DHCP DISCOVER, DHCP OFFER, DHCP REQUEST, and DHCP ACK, as shown in the following figure.

DHCP and DNS: How DHCP Works

Figure 3: How Does DHCP Work

As shown above, the procedures of how a dynamic IP address is assigned by the DHCP server are as follows.


  • DHCP Discovery - the client computer sends out a broadcast packet including its name and MAC address to find a DHCP server.

  • DHCP Offer - A DHCP server responds to “Discovery” with an offer for an IP address that is available.

  • DHCP server responds to “Discovery” with an offer for an IP address that is available.

  • DHCP Request - The client computer then replies with a DHCP REQUEST to ask the DHCP server for the IP address offered.

  • DHCP Ack - The DHCP server sends a DHCP ACK to tell the client that it’s okay to use the requested IP address assigned to it now.

Simply put, it’s a story of “take and give” between DHCP client (A) and DHCP server (B):

  • A: Who can give me an IP address?

  • B: Ummm, let me check…There is One available!

  • A: Great! Give me, please!

  • B: No problem, here you are.

How DNS Works

As shown below, when typing a domain name into the browser, for example, fs.com, the browser often has no idea where FS.COM is. Therefore it will send a query to the LDNS (Local DNS Server) asking questions such as “what’s the IP address of FS.COM”. If the LDNS has no record for FS.COM, it will search the Internet to find out who owns www.fs.com. Detailed working procedures are as follows.

  • First, the LDNS goes to one of the root servers which directs it to the .com DNS server.

  • The .com DNS server then finds out the owner of www.fs.com and notifies the LDNS with a name server (NS) record for FS.COM.

  • The LDNS responds by requesting an Address record (A record) which includes the IP address for FS.COM.

  • After receiving the A record, the LDNS will send the IP address to the browser and caches the IP address information for future reference.


DHCP and DNS: How DNS Works

Figure 4: How Does DNS Work

To summarize, DHCP server assigns the IP addresses to client computers, while DNS server resolves them. They are two essential technology developed for us to use the network or Internet conveniently. In addition, both DHCP and DNS are essential tools in the network administrator's toolkit for managing all the IP devices on a corporate network.

36.1k

You might also be interested in