DHCP and DNS: What Are They, What’s Their Difference?
Home Enterprise Network DHCP and DNS: What Are They, What’s Their Difference?

DHCP and DNS: What Are They, What’s Their Difference?

Posted on by FS.COM

The DHCP and DNS are both created to make it easy for us to use networks or the Internet. However they are totally two different technologies in actual applications. The DHCP is a protocol that helps us to assign an IP address and related IP information to the computer in the network, whereas the DNS is used to convert a website name like FS.COM to its IP address and vice versa. This is to ensure that our computer can find the right site because a computer can only find a site through its IP address, rather than its domain name. Although the definitions of DHCP and DNS above are helpful, they are quite basic. You may still be confused about how to differentiate them so we have created a detailed overview of exactly what is DHCP, DNS, and the differences between them.

What Is DHCP and How It Works?

DHCP is short for Dynamic Host Configuration Protocol. It is mainly responsible for distributing IP addresses within a network quickly and automatically. In addition, it is also used for configuring proper subnet masks, default gateways, and DNS server information on the device. Due to these features, the DHCP is now configured on almost every device that connects to a network such as a computer, a Gigabit Ethernet switch, etc. Using a DHCP on network switches can provide many valuable TCP/IP network services, for example, it helps to automatically upgrade software on client systems. Thus many modern fiber switches are made to support DHCP.

How Does DHCP Work?

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 below, the client computer sends out a broadcast packet DHCP DISCOVER including the computer’s name and MAC address so the DHCP server can respond to it. It basically says “I’m looking for a DHCP server who can lease an IP address”. The server receives the DHCP DISCOVER and responds to it with a DHCP OFFER message. The client then replies with a DHCP REQUEST, which means it wants to accept the configuration sent by the DHCP server. After getting this DHCP REQUEST message, the DHCP server will send a DHCP ACK to tell the client that it can use the IP address assigned to it now.

DHCP and DNS: How DHCP Works

How DHCP Works Diagram

What Is DNS and How It Works?

DNS is also known as Domain Name System. As mentioned above, it matches human readable names and their associated IP addresses, which seems negligible when we suffer the Internet. However, the DNS is one vital component in the networking infrastructure. Not only does it deliver content and applications, but it also ensures high availability and quality user response time. If the DNS fails, most web applications will fail to function properly.

How Does DNS Work?

As shown below, when we type 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 Local DNS Server (LDNS) 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. 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 a 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

How DNS Works Diagram

DHCP and DNS Differences

From the above, though both DHCP and DNS are related to IP address, they play totally different roles. To be clear, here uses a chart to conclude DHCP vs 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.

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.

Tags: , ,

Copyright © 2002-2018. All Rights Reserved.