What Is DHCP? How Your Router Assigns IP Addresses

DHCP is what automatically gives every device on your network an IP address when it connects — so you never have to configure it manually. Here's how it works and when you'd change it.

The one-sentence explanation

DHCP (Dynamic Host Configuration Protocol) is the system your router uses to automatically assign an IP address to every device that connects to your network — so you never have to configure network settings manually on each device.

What DHCP actually does

When your phone connects to your WiFi, it doesn't know what IP address to use. It sends a broadcast message: "Is there a DHCP server here? I need an IP address." Your router — which runs a DHCP server — responds with:

  • An IP address to use (e.g. 192.168.1.45)
  • The subnet mask (usually 255.255.255.0)
  • The default gateway (the router's own IP, e.g. 192.168.1.1)
  • DNS server addresses to use for domain lookups
  • A lease time — how long the device can keep this IP before it must renew

This four-step process (Discover → Offer → Request → Acknowledge) happens automatically in milliseconds every time a device joins your network. You never see it.

What a DHCP lease is

A DHCP lease is a temporary assignment — the router loans an IP address to a device for a set period (typically 24 hours to 7 days on home routers). When the lease expires, the device automatically renews it (usually getting the same IP back). If the device is off the network when the lease expires, the IP is returned to the available pool for other devices.

This is why your laptop's IP address might occasionally change — if it was off long enough for the lease to expire and another device took that address.

DHCP vs static IP: which to use

DHCP (dynamic)Static IP (manual)
SetupAutomatic — no configurationManual — enter IP, mask, gateway, DNS on the device
IP changes?May change occasionallyNever changes
Best forPhones, laptops, tablets, most home devicesPrinters, NAS, servers, devices you port-forward to
RiskRare IP conflicts if DHCP pool is exhaustedIP conflict if you manually assign an address already in use

Use static IPs for devices you need to reach by address (a home NAS, a security camera, a print server). Use DHCP for everything else. See static vs dynamic IP guide for full details.

DHCP reservation (the best of both)

Most routers let you create a DHCP reservation — you tell the router "always give device X (identified by its MAC address) the same IP address." The device still uses DHCP (no manual configuration needed), but it always gets the same IP. This is the recommended approach for printers, NAS devices, and anything you port-forward to.

To set up a DHCP reservation: log in to your router admin panel → find DHCP Reservations, Address Reservation, or Static DHCP under the LAN or DHCP settings → add the device's MAC address and the IP you want to assign.

Common DHCP problems and fixes

  • "DHCP server not found" / "Failed to obtain IP": The device couldn't reach the router's DHCP server. Restart both the device and the router. Check that the device is actually connected to the right network (not a neighbouring WiFi).
  • IP address conflict: Two devices have the same IP. This happens if you manually set a static IP that's within the DHCP range. Fix: change the static IP to be outside the DHCP pool range (e.g. if DHCP assigns 192.168.1.2–254, set static IPs to 192.168.1.200+).
  • Device keeps getting a different IP: Leases are expiring or the router is assigning from a large pool. Set up a DHCP reservation for that device to pin it to a consistent address.

Related Guides

More From This Section