We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
System Design Masterclass · Cloud Infrastructure
Free preview: the first 2 parts of this 7-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Cloud Infrastructure
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
It is easy and good
“It is really nice and good Please join the course”
you're the network admin at a company with 10,000 employees. Each one needs an IP address, a subnet mask, a default gateway, and server addresses to get online. Without DHCP, you'd hand-configure every single one of those machines. And every time someone moved desks, got a new laptop, or a visitor connected to the guest Wi-Fi, you'd be right back at it.
That's not a hypothetical, that's literally how networking worked before DHCP. Admins maintained spreadsheets of IP assignments. Conflicts happened constantly (two devices getting the same IP). New employees waited hours or days for network access.
DHCP changed all of that. It's the reason you can walk into a coffee shop, connect to Wi-Fi, and be online in three seconds without typing a single configuration value. It's the reason cloud instances boot up with networking already working. It's running silently on virtually every network on the planet, and most people don't know it exists.
Dynamic Host Configuration Protocol is a client-server protocol that automatically assigns network configuration to devices. Not just an IP address, a full set of networking parameters:
| Parameter | What It Is | Example |
|---|---|---|
| IP Address | The device's identity on the network | 192.168.1.47 |
| Subnet Mask | Defines the network boundary | 255.255.255.0 |
| Default Gateway | The router to reach other networks | 192.168.1.1 |
| Servers | Where to resolve domain names | 8.8.8.8, 8.8.4.4 |
| Lease Duration | How long the assignment is valid | 86400 seconds (24 hours) |
| Domain Name | The network's domain suffix | corp.example.com |
The DHCP server maintains a pool of available addresses and a table of current leases. When a new device connects, the server picks an unused address from the pool, assigns it, and records the lease. When the lease expires and the device hasn't renewed, the address goes back into the pool.
DHCP operates on UDP ports 67 (server) and 68 (client). It uses UDP instead of because when a device first connects, it doesn't have an IP address yet, and you need an IP to establish a TCP connection. It's a chicken-and-egg problem that UDP solves by allowing connectionless communication.