Skip to content
Innovialabs

What Is DHCP and How Devices Get an IP Address

Basics4 min

In short

DHCP is a service, usually on the router, that automatically gives each device an IP address, gateway and DNS for a limited time (a lease); printers, cameras and servers should get fixed addresses through reservations so they never change.

The short answer

DHCP (Dynamic Host Configuration Protocol) is the service that automatically configures a device when it joins the network. Without it, someone would have to type settings into every laptop and phone by hand.

A DHCP server gives each device:

  • an IP address (for example, 192.168.1.57);
  • a subnet mask — which addresses belong to the local network;
  • a default gateway — the router's address for reaching the internet;
  • DNS servers — who turns names like example.com into addresses.

In a small office the DHCP server is usually the router. In larger networks it may be a Windows Server, a firewall or a dedicated service.

How a device gets an address: the lease process

The exchange takes four messages, often remembered as DORA:

  1. Discover — the new device shouts to the whole network: "Is there a DHCP server?"
  2. Offer — the server replies: "You can take 192.168.1.57."
  3. Request — the device answers: "I accept 192.168.1.57."
  4. Acknowledge — the server confirms and records the address as taken.

The address is given for a limited time — a lease. About halfway through, the device quietly asks to renew it. If a laptop leaves the office and does not come back, its lease expires and the address returns to the pool.

You can see what your computer received:

# Windows
ipconfig /all

# macOS / Linux
ifconfig    # or: ip addr

If a Windows machine shows an address starting with 169.254, it did not get a reply from any DHCP server — check the cable, Wi-Fi or the server itself.

Scopes, pools and lease time

A scope is the range of addresses the server is allowed to hand out, plus the settings that go with it. A typical small office layout:

RangePurpose
192.168.1.1Router (gateway)
192.168.1.2 – 192.168.1.49Reserved for printers, cameras, servers, access points
192.168.1.50 – 192.168.1.250DHCP pool for laptops and phones

Lease time is a trade-off. Short leases return addresses quickly, which helps on busy guest Wi-Fi with many passing devices. Long leases suit a stable staff network. If the pool keeps running out, the fix is a larger pool or a separate guest segment, not just a shorter lease.

Reservations vs static IPs

Printers, IP cameras, NAS, servers and access points must keep the same address — otherwise computers and recorders lose them after a reboot. There are two ways:

  • DHCP reservation — the server always gives the same address to a specific MAC address. Settings stay in one place, and the device still gets the correct gateway and DNS automatically. This is usually the best option.
  • Static IP on the device — the address is typed into the device itself. Works even if DHCP is down, but it is easy to forget and accidentally put the same address into the pool.

Whichever you choose, keep static and reserved addresses outside the DHCP pool and record them in a simple table: device, MAC, IP, location.

Common problems and conflicts

  • IP address conflict. Two devices have the same address, usually because someone set a static IP inside the DHCP pool. Move the static address out of the pool or use a reservation.
  • Rogue DHCP server. A second DHCP source appears — most often a home Wi-Fi router plugged into an office socket. Devices randomly receive wrong addresses and lose internet. Turn off DHCP on that device or switch it to access point mode. Managed switches support DHCP snooping, which allows DHCP replies only from trusted ports.
  • Pool exhausted. New devices cannot connect while old ones work. Check how many leases are active and whether guest devices share the staff pool.
  • Wrong DNS handed out. Internet "works" by IP but sites do not open. Check the DNS servers in the scope settings.

FAQ

Usually not. The router's built-in DHCP is enough for a typical small office. A separate server makes sense when you have a domain with Active Directory, several network segments or need detailed logs.

We can help with this

If you'd rather get the result than figure it all out yourself — this is what we do every day.

Discuss a project

Read next

Have an idea or a task? Tell us about it

We'll reply within one business day and propose a solution. The consultation is free.