Day 69 of 90 Days of DevOps Challenge: Understanding DHCP and DNS

Vaishnavi DVaishnavi D
4 min read

After understanding the OSI and TCP/IP models in yesterday's session, I gained clarity on how data travels across networks and how different layers support communication, routing, and application-level interactions. This networking foundation is crucial, especially when working with cloud-native tools like AWS, Kubernetes, and Docker.

Today, I dove deeper into IP address allocation and name resolution, focusing on two essential protocols every DevOps engineer must understand:

  • DHCP (Dynamic Host Configuration Protocol)

  • DNS (Domain Name System) and DNS Resolvers

What is DHCP and How Does It Work?

DHCP (Dynamic Host Configuration Protocol) is a network management protocol that automatically assigns IP addresses to devices on a network.

This protocol allows devices to communicate on an IP network without manual IP configuration, which is critical for scalability, automation, and minimizing configuration errors.

How DHCP Works: DORA Process

DHCP uses a 4-step process often remembered as DORA:

1. Discover

  • When a device (client) connects to a network, it sends a broadcast message (DHCPDISCOVER) across the network.

  • This message asks, “Is there any DHCP server out there?”

2. Offer

  • A DHCP server on the network replies with a DHCPOFFER.

  • This message contains:

    • Offered IP address

    • Lease duration

    • Subnet mask

    • Default gateway

    • DNS server IPs

3. Request

  • The client responds with a DHCPREQUEST, indicating it wants to use the offered IP.

  • If multiple servers respond, the client chooses one offer and requests that specific server.

4. Acknowledgement

  • The server sends a DHCPACK, confirming the lease and IP assignment.

  • The client is now configured and can start communicating on the network.

Lease Time

  • Every IP assignment by DHCP is temporary, based on a lease time.

  • Before the lease expires, the client must renew the IP using the DHCPREQUEST message again.

  • If the client leaves the network or doesn't renew the lease, the IP returns to the DHCP pool for reuse.

Why DHCP is Important

  • Reduces manual IP address assignment

  • Avoids IP conflicts

  • Simplifies network administration, especially in environments with hundreds/thousands of devices

  • Used in cloud networks, VMs, and containers for dynamic IP assignment.

  • Reduces human error in network setup.

  • Essential in scalable, automated environments like AWS, GCP, or Azure.

What is DNS?

Domain Name System is the “phonebook of the internet.” It translates domain names (such as www.google.com) into IP addresses (like 142.250.183.196) that computers use to locate one another.

Without DNS, users would need to memorize the IP address of every website or service, making internet navigation impractical and inefficient.

What is a DNS Resolver & How It Works

A DNS resolver (also known as a recursive resolver) acts as an intermediary between the user’s device and the authoritative DNS servers.

DNS Resolution Flow:

  1. Query Initiation:
    A user types example.com into a browser.

  2. Local Cache Check:
    The DNS resolver (often provided by your ISP or cloud provider) first checks its local cache.

  3. Root Server Contact:
    If not found, the resolver queries the root DNS servers to find which server holds the .com zone.

  4. TLD Server Query:
    It contacts the Top-Level Domain (TLD) DNS server to locate example.com.

  5. Authoritative DNS Server:
    Finally, it queries the authoritative server, which returns the correct IP address.

  6. Response to Client:
    The resolver returns the IP to the user's browser, and the site loads.

This all happens within milliseconds.

Why This Is Crucial in DevOps

  • Every time you run a curl, deploy to a DNS-mapped server, or interact with a cloud API, DNS resolution is at work.

  • Tools like Route 53 in AWS are managed DNS services, used to host domain names and route traffic globally.

  • In container orchestration (like Kubernetes), CoreDNS resolves service names to internal cluster IPs.

  • Troubleshooting issues like “host not found” often point to DNS misconfigurations or resolver issues.

Final Thoughts

Understanding how IP addresses are assigned (DHCP) and how domain names are resolved (DNS) is foundational for modern DevOps. These protocols ensure seamless network communication, whether you're deploying to a VM, setting up a Kubernetes service, or configuring cloud routing.

Stay tuned as we bridge networking theory into cloud-scale execution!

0
Subscribe to my newsletter

Read articles from Vaishnavi D directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Vaishnavi D
Vaishnavi D