Advertisement

What Is DHCP? How Devices Get IP Addresses Automatically

You've probably connected hundreds of devices to Wi-Fi networks in your life, and not once did you have to type in an IP address. That's because of DHCP โ€” the Dynamic Host Configuration Protocol โ€” a background service that hands out network settings automatically the instant a device joins.

What DHCP actually does

When your phone joins your Wi-Fi, a four-step conversation happens in milliseconds, often nicknamed DORA:

  1. Discover โ€” the phone broadcasts: "Is there a DHCP server here?"
  2. Offer โ€” the router replies: "Yes. How about 192.168.1.42?"
  3. Request โ€” the phone says: "I'll take it."
  4. Acknowledge โ€” the router confirms and records the assignment.

Along with the IP address, DHCP also delivers the subnet mask, the default gateway, and which DNS servers to use โ€” everything a device needs to get online.

Leases: why assignments expire

DHCP addresses aren't permanent โ€” they're leased, typically for 24 hours to a week. Before the lease expires, an active device quietly renews it (usually keeping the same address). If a device leaves, its address eventually returns to the pool for someone else. This recycling is why a house with one router can serve a decade of visiting phones without running out of addresses.

Advertisement

DHCP reservations: the best of both worlds

Sometimes you want a device to always get the same address โ€” a printer, a NAS, a security camera. Rather than configuring the device manually, set a DHCP reservation in your router: it pins a specific IP to the device's MAC address. The device still uses automatic configuration, but always receives the same answer. This is more robust than setting a static IP on the device itself.

When DHCP goes wrong

Note that DHCP only manages your private addresses. Your public IP โ€” check it here โ€” is assigned by your ISP through a separate process.

๐ŸŒ Curious what your connection reveals right now? Check your IP address and location โ†’

Frequently asked questions

Should I turn off DHCP?

Almost never. Without it, every device needs manual configuration. The only common reason to disable it is when adding a second router to a network that already has a DHCP server.

Why did my device's IP change?

Its DHCP lease expired while it was offline and the address went to another device. If a device needs a stable local IP, create a DHCP reservation for it in your router settings.

Advertisement