What Is DHCP? How Devices Get an IP Address Automatically
DHCP explained for beginners: the DORA exchange, lease lifetimes, options, relay agents, reservations, and how DHCP fits next to DNS and IPAM.

On this page
Every time a laptop, phone, camera, or temperature sensor joins a network, something has to decide which IP address it gets, which gateway it should use, and which DNS servers it should ask. Doing that by hand does not scale past a handful of devices, which is why almost every network from a home router to a multinational campus runs DHCP.
DHCP, the Dynamic Host Configuration Protocol, is the service that makes that decision automatically. It hands out an address and a set of related settings to a device that asks, keeps track of what it gave out and for how long, and takes the address back when the device leaves. It is one of the quietest protocols on a network and one of the hardest to operate if nobody records what it is doing.
What DHCP Actually Does
A device that joins a network starts with no usable address, so it cannot be reached and cannot look up anything. DHCP gives it four things at minimum: an IP address, a subnet mask, a default gateway, and one or more DNS servers. Those four pieces are enough for the device to talk to its local segment and to the internet.
The settings travel as options inside the DHCP reply. Option 3 carries the gateway, option 6 carries the DNS servers, option 15 carries the domain name, and option 51 carries the lease time. Because options are extensible, a network can also push vendor specific settings such as a voice VLAN for phones, a TFTP server for a boot image, or a time server for clocks.
The DORA Exchange
The conversation a client has with a server is usually written as DORA, for the four messages it exchanges.
| Step | Message | Direction | What it means |
|---|---|---|---|
| 1 | Discover | Client to broadcast | The client has no address and asks if any server is out there |
| 2 | Offer | Server to client | A server proposes an address and its options |
| 3 | Request | Client to broadcast | The client asks for the offer it wants, and other servers withdraw theirs |
| 4 | Acknowledge | Server to client | The server confirms the lease and records it as active |
The client sends the first message to the broadcast address because it does not yet know who the servers are. The reply carries everything the client needs to configure itself, and the server marks the address as leased so it will not hand it to anyone else.
Leases, Renewals, and Reclaiming Addresses
DHCP does not give addresses away permanently. It leases them for a fixed time, and the client renews before the lease runs out. A client typically renews at half the lease time, and if that fails it keeps trying until the lease expires, at which point it stops using the address and starts the DORA exchange again.
Lease time is a trade off. A long lease means fewer renewals and less chatter, which suits stable office and server segments. A short lease returns addresses to the pool faster, which suits guest Wi-Fi, conference rooms, and any segment where devices come and go. Whatever value you pick, the pool is finite, and a segment that quietly runs out of leases is one of the most common causes of a partial outage, which is why DHCP scope exhaustion deserves an alert rather than a helpdesk ticket.
Reservations, Static Addresses, and Scope Design
Not every device should take whatever address is free. Servers, printers, switches, and anything referenced by a firewall rule or a monitoring system need a predictable address. There are two ways to get one: a static address configured on the device, or a DHCP reservation that binds a MAC address to an IP.
Reservations keep the address managed by DHCP, so the server knows it is in use and the record lives with the rest of the scope. Static addresses take the device out of DHCP entirely, which is common for infrastructure but easy to forget in the documentation. Whoever owns the plan should decide which category each device falls into, and both should be recorded, because an address that exists in the network but not in the records is how overlaps and conflicts start.
A scope also needs a sensible boundary. The dynamic pool normally sits inside the subnet but does not cover all of it, leaving room for the gateway, the broadcast address, static infrastructure, and reserved space. Getting that wrong is subtle: a pool that fills the whole subnet will eventually hand out the gateway address or collide with a static server.
Relay Agents and Multiple Subnets
DHCP clients broadcast their first message, and broadcasts do not cross routers. On a network with many VLANs that would mean a DHCP server on every segment, which is wasteful and hard to manage. The answer is a DHCP relay agent, often called an IP helper address, configured on the router or Layer 3 switch.
The relay listens for the client broadcast, wraps it in a unicast packet addressed to a real DHCP server, and records which subnet it came from. The server leases an address from the matching scope and the relay passes the reply back. From the client’s point of view there is a server on its own segment, even though the real server may be several hops away.
Where DHCP Sits Next to DNS and IPAM
DHCP, DNS, and IPAM are the three services that keep addressing under control, which is why they are often grouped as DDI. DHCP decides addresses dynamically, DNS maps names to addresses, and IPAM records the plan that both are supposed to follow and holds the static assignments neither one owns.
The gap that causes most trouble is between DHCP and IPAM. The server knows which leases are active right now, but it does not know which subnet a scope belongs to, how much of the pool is reserved, or which team owns the segment. Teams that record DHCP pool ranges and reservations next to their subnets, the way IP address management in Obelinf does, can answer those questions without logging into a server and reading scope configuration. To see how the three services divide the work, read what DDI means and keep the subnet calculator handy when you size a new scope.
Frequently Asked Questions
What does DHCP stand for?
What is the DHCP DORA process?
How long does a DHCP lease last?
What is a DHCP reservation?
What happens if a device cannot reach a DHCP server?
Why do devices on another subnet still get DHCP addresses?
Free Tools
Put this into practice with the free calculators, reference tables, and checklists in the Obelinf toolkit.
Stop reaching for a spreadsheet
Obelinf keeps every subnet, device, circuit, and rack in one live source of truth, with audit logs and a topology view. Free for personal use.
Related Articles

ASN Planning for Multi-Site Networks
How to decide between one ASN and many, allocate prefixes that summarize cleanly, build the internal control plane, and verify a site's announcements before it leaks a route.
Read more
How to Register an ASN: RIR Application Walkthrough
A step by step ASN application walkthrough for ARIN, RIPE NCC, APNIC, LACNIC, and AFRINIC: the dossier to build, the fees and turnaround, and the commands that prove the assignment is live.
Read more
AWS VPC Design Best Practices: CIDR, Subnets, and Routing
Design an AWS VPC the right way: size the CIDR block, lay out public, private, and isolated subnets across availability zones, and wire route tables without common mistakes.
Read more