DHCP vs. DNS: What’s the difference?

Night view of Riyadh city skyline with the illuminated Kingdom Centre Tower in the center.

Authors

Phill Powell

Staff Writer

IBM Think

Ian Smalley

Staff Editor

IBM Think

The designations Dynamic Host Configuration Protocol (DHCP) and DNS (Domain Name System) refer to protocols governing networks.

Despite its similarities, each performs specific functions. DNS converts human-readable domain names into numerical computer IP addresses. Meanwhile, DHCP automates the assignment of IP addresses. 

Why are network protocols necessary?

Imagine a single shipping port that welcomes all types of vehicles, whether they travel by land, sea or air. That port is roughly like a computer network, which must accommodate and converts the interoperability needs of numerous devices. No matter how complex and disparate, those devices can fulfill their mission to properly and securely transmit or receive data.

Without proper network management, in particular the effective use of network protocols, chaos can easily ensue. Even client devices connected to the same simple system (like through a small local area network (LAN)) can lose the ability to communicate and interact successfully. Soon, these issues can cause operational problems for the network, possibly even culminating in full-scale communication breakdowns.

Network protocols counter such problems through imposing order in a few different ways: 

  • Providing a single language that various devices can use for communication.
  • Specifying how a system’s data is made ready for transmission, through the packaging, addressing, routing and receiving of that data.
  • Offering network security enhancements to guard data from unauthorized users, while still enabling DHCP traffic flow despite the presence of firewalls.
  • Working to optimize network services and their performance through regulated data flow and information prioritization.
  • Giving administrators a clear view of device performance and established network settings.

The latest tech news, backed by expert insights

Stay up to date on the most important—and intriguing—industry trends on AI, automation, data and beyond with the Think newsletter. See the IBM Privacy Statement.

Thank you! You are subscribed.

Your subscription will be delivered in English. You will find an unsubscribe link in every newsletter. You can manage your subscriptions or unsubscribe here. Refer to our IBM Privacy Statement for more information.

DHCP: Solving the need for speed

Network protocols serve various purposes. Dynamic Host Configuration Protocol (DHCP), for example, was designed to put automation into motion. Teams employ automation in network protocols for most of the same reasons that automation is tapped for service: increased efficiency, faster processing and fewer errors. 

For starters, automation boosts efficiency by automating repetitive tasks, so automated processes can run dependably in the background, thus freeing network administrators from having to supervise those activities. 

Similarly, automation has a liberating effect on processing speed. It's not shocking to learn that automated processes conducting lookups can access information at an entirely new level of velocity when compared to human counterparts searching for IP addresses. Automation’s able to achieve this result, in part, due to the use of caching. Data that’s repeatedly accessed can be retained in a cache, making it instantly accessible when again needed for future lookups. 

Automation also limits the occurrence and effects of human error and human delays in information searches. In addition, automation provides other benefits, such as assisting in the cause of increased scalability and fostering load balancing.

NS1 Connect

IBM NS1 Connect

Strengthen your network resilience with IBM NS1 Connect. In this video, we discuss the value of IBM NS1 Connect for application resilience and performance.

How DHCP works

DHCP operates with a process called DORA, based on the acronym DORA (discover, offer, request, acknowledgment). The process seeks to match client devices with DHCP servers and then assign IP addresses to those devices. To achieve this result, it engages in some general back-and-forth messaging.

Step 1: Discover

DHCP work begins when a newly connected DHCP client device transmits a broadcast message that’s sent to the local network. This query, which is called a discover message, searches for active DHCP servers. 

Step 2: Offer

A DHCP server that receives the discover message and has an available IP address then sends the DHCP offer. The DHCP server notifies the client directly by sending a message to the client’s MAC address. A media access control (MAC) address is a preassigned, 12-digit number assigned to each physical device during its manufacture.

In addition to confirming availability, the offer also includes these features: 

  • A proposed IP address for the client.
  • A subnet mask, which is a 32-bit number that separates an IP address into two parts, consisting of a network portion and a host portion. Subnet masks allow the device to triage routing destinations according to whether they can be handled through the local network or need to be sent to a router for further distribution.
  • Specifications about the lease time duration. Whenever a DHCP network assigns an IP address to a destination, it’s done for a specific period. For websites that don't receive constant updates, a static IP address can be used. Static IP addresses don’t change, while dynamic IP addresses are understood to be temporary in nature and assigned by an internet service provider (ISP). Regardless of which form you choose, the IP address stops working when its lease period expires, and you must request a new replacement IP address. Lease times are often kept temporary in nature to help ensure that website content remains properly and regularly refreshed. A lease period of 24 hours is often used as a de facto choice.
  • Network settings like the default gateway and the DNS server. The default gateway is just the IP address of a router. Unless other special routing is required, that router serves as the default interface that connects that device with the world at large—through other networks, including the internet. Meanwhile, a DNS server is a computer operating on the internet that turns human-readable domain names into numerical sequences used in IP addresses. 

Step 3: Request

By this point, a DHCP offer has been made in response to the original discover message. It’s also possible (and even probable) that multiple DHCP offers have been received. If that’s the case, the client device chooses an offer—typically the first one received.

The client confirms this selection by issuing a DHCP request message that goes out to all DHCP servers. This message lets other DHCP servers know the client is accepting the proposed IP address allocation, so the offers other servers issued can be summarily retracted. Because an IP address hasn’t formally been granted, request messages are transmitted by use of broadcast addresses. 

Step 4: Acknowledgment

Acknowledgment serves as a final confirmation of the “transaction” that successfully occurred. This result comes from the DHCP server that the client chose through its request message.

The DHCP server transmits an acknowledgment (ACK) message that closes the transaction by restating the terms of this agreement. Specifically, the IP address and any other relevant details, such as the lease period.

The client configures its interface with the newly supplied details, and the IP address goes “live” and becomes a dynamic IP address. Now the client device can operate fully and interact capably within the DHCP network.

DNS: Playing the name game

The other protocol that we’re primarily examining in this article is the DNS (Domain Name System). Domain names are easy-to-remember website addresses that represent popularly known internet destinations (for example, ibm.com). 

Domain names are built from two components: 

  • Top-Level Domain (TLD): Slightly contrary to how its name sounds, a TLD is the last section of a domain name and not the first. The TLD chosen should reflect the overall aim of the page. This is the reason why commercially run websites display the standard “.com” TLD to signify that it’s operating as part of a commercial enterprise. By the same token, educational enterprises use the “.edu” TLD and websites run by nonprofit groups usually carry the “.org” TLD. Root servers are top-level name servers that exist within DNS and route queries to the correct TLD servers.
  • Second-Level Domain (SLD): The SLD appears before the TLD within the domain name. This component indicates a particular website or company or organization name. In “ibm.com,” for example, “ibm” is the SLD and refers to International Business Machines (IBM®).

How DNS works

Every DNS query (or DNS request) follows the same process to resolve IP addresses. When a user enters a URL, the computer queries DNS servers step by step to find the necessary information and resource records. The process ends when the authoritative DNS server for that domain provides the final answer.

If you investigate the topic of domain name systems, you encounter the "phone book analogy,” which equates how DNS works with the functions of telephone directories. The only problem is that not everyone might understand this reference.

Many modern users of cell phones have not searched for phone listings with a traditional phone book, instead relying on online listings or digital assistants (like Apple’s Siri).

Dated or not, the phone book analogy still works because it nicely captures the core functions at work. And people looking at online directories are still performing the same action—they’re using an electronic form of phone book to run lookups. 

IP address management now performs the administrative chore work connected with handling IP addresses and the hostnames that might be associated with them. DNS specializes in solving complex name resolution issues that can occur and might otherwise require later troubleshooting.

One key way that DNS works is by ramping up internet speed with DNS caches, which store previously accessed domain names, along with the IP addresses associated with them. This approach is used to reduce the need for repeated lookups of the same information. These DNS records are stored in different DNS caches, and they help locate IP addresses more easily and quickly.

In contrast to the normal, automated method of network configuration supported by DHCP, DNS provides a means for manual configuration that bypasses network intervention completely. This method can be useful if an individual or organization would prefer to use alternative DNS servers to get customized performance or enhanced privacy.

Other notable network protocols

Although we’ve focused on two of the most used network protocols, others also deserve mention: 

  • TCP/IP: A major protocol, the TCP/IP suite (based on the term transmission control protocol) is all about data delivery. Data is transmitted between applications with data packets. TCP ensures that packets are ordered logically and checked for potential errors before being distributed to internet applications, such as web browsers.
  • UDP: As a type of alternative to TCP/IP, user datagram protocol (UDP) is a communication protocol computer networks use to deliver content in real-time applications. In this protocol, operational speed is a requisite, like in online gaming and video streaming. UDP uses datagrams instead of the packets TCP/IP uses and requires no established connection.
  • VPN: Although not technically a single protocol, virtual private network (VPN) technology uses various protocols. This technology helps to provide a secure and private wifi connection between a client device and a remote network operating through the internet. To ensure privacy, VPNs specialize in data encryption. VPNs often work with other protocols like TCP and UDP.
Related solutions
IBM NS1 Connect

IBM NS1 Connect is a fully managed cloud service for enterprise DNS, DHCP, IP address management and application traffic steering.

Explore NS1 Connect
Networking Solutions

Cloud networking solutions from IBM provide high-performing connectivity to power your apps and business.

Explore cloud networking solutions
Networking Support Services

Consolidate datacenter support with IBM Technology Lifecycle Services for cloud networking and more.

Cloud networking services
Take the next step

Strengthen your network resilience with IBM NS1 Connect. Start with a free developer account to explore managed DNS solutions or schedule a live demo to see how our platform can optimize your network's performance and reliability.

Explore Managed DNS Services Book a live demo