What is DHCP? Dynamic IP Assignment Explained
How devices get their IP configuration automatically, when to use static addresses instead, and what to do when you have multiple subnets.
The Problem DHCP Solves
Before DHCP, every device on a network needed its IP address, subnet mask, default gateway, and DNS servers configured manually. In an office with 50 devices, that means 50 places to update whenever the network changes — and 50 opportunities for typos that cause silent connectivity problems.
Dynamic Host Configuration Protocol (DHCP) automates this. Devices ask for configuration when they connect, and a DHCP server provides it automatically from a pool of addresses you define.
The DORA Process
When a device connects to a network, it does not have an IP address yet — so it cannot send a normal unicast packet. Instead, it broadcasts to the entire subnet:
- Discover — the device broadcasts "Is there a DHCP server?" to
255.255.255.255. Every device on the subnet hears it, but only DHCP servers respond. - Offer — the DHCP server replies with a proposed IP address, lease time, subnet mask, gateway, and DNS servers.
- Request — the device broadcasts "I accept that offer" (broadcast so other DHCP servers, if any, know the decision).
- Acknowledge — the server confirms the assignment and records it in its lease table.
The whole exchange typically takes under a second and happens automatically every time a device connects or its lease expires. Devices usually start renewing at 50% of the lease time — so a 24-hour lease triggers a renewal attempt after 12 hours.
What DHCP Provides
A DHCP server hands out everything a device needs to communicate on the network:
| Setting | Example | Purpose |
|---|---|---|
| IP address | 192.168.1.45 | Identifies the device on this subnet |
| Subnet mask | /24 | Defines which addresses are local |
| Default gateway | 192.168.1.1 | Where to send non-local traffic |
| DNS servers | 1.1.1.1, 8.8.8.8 | Where to resolve hostnames |
| Lease time | 24 hours | How long the assignment is valid |
DHCP Scope
The scope is the pool of addresses the DHCP server will hand out. For a
subnet 192.168.1.0/24, you might configure a scope of 192.168.1.100 to 192.168.1.200, reserving the lower range for
statically-assigned devices.
.100, assign static IPs only below .100. A device manually
configured with 192.168.1.150 could clash with a DHCP lease for the same
address — causing intermittent connectivity failures that are notoriously hard to
diagnose.Reservations (Static DHCP)
A reservation tells the DHCP server to always assign the same IP address to a specific device, identified by its MAC address. The device still gets its configuration automatically — but it always gets the same address.
Use reservations for devices that need to be reliably reachable at a consistent address:
- Network printers
- NAS drives and storage
- Smart TVs and conference room displays
- IoT devices and sensors
When to Use Static IPs
Assign static IP addresses directly on the device for anything that provides a network service or that other systems depend on by IP:
- Network infrastructure — routers, switches, firewalls, access points
- Servers — your DHCP server itself, DNS servers, file servers
- Monitoring targets — any device polled by IP address
Everything else — laptops, desktops, phones, tablets — should use DHCP. Fewer manual assignments means fewer conflicts and less documentation to keep up to date.
DHCP Relay for Multiple Subnets
DHCP Discover broadcasts do not cross router boundaries — each subnet would normally need its own DHCP server. A DHCP relay agent solves this by forwarding DHCP broadcasts from a subnet to a central DHCP server elsewhere on the network.
Relay agents are typically configured on the router or layer-3 switch with one line per VLAN interface. Most enterprise routers and managed switches support this out of the box. The result: one DHCP server manages scopes for every subnet in your building.
Know which IPs are static vs DHCP
getIPAM lets you mark each allocation as static or DHCP-reserved, so you always know which addresses are spoken for and why.
Start free