4 min read

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.

ByAndré Ribeiro· Founder, Obelinf
What Is DHCP? How Devices Get an IP Address Automatically
What Is DHCP? How Devices Get an IP Address Automatically · October 18, 2026
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?
DHCP stands for Dynamic Host Configuration Protocol. It is the service that hands out IP addresses and the related settings, such as the default gateway and DNS servers, to devices when they join a network.
What is the DHCP DORA process?
DORA is the four step exchange a client uses to get a lease: Discover (the client broadcasts asking for a server), Offer (a server proposes an address), Request (the client asks for that specific address), and Acknowledge (the server confirms the lease). The whole exchange takes fractions of a second.
How long does a DHCP lease last?
The lease time is set by the scope, commonly eight hours to several days on a stable office network and one to four hours on a high churn guest network. A client renews at half the lease time and can keep using its address as long as the server keeps extending it.
What is a DHCP reservation?
A reservation ties a specific MAC address to a specific IP address, so the device always receives the same address while the server still tracks it. It is the middle ground between a fully dynamic pool and a hardcoded static address, and it belongs outside the dynamic pool range.
What happens if a device cannot reach a DHCP server?
Most operating systems fall back to Automatic Private IP Addressing and assign themselves an address in the 169.254.0.0/16 link-local range. That address is not routable, so the device can talk only to other hosts on the same segment until it gets a real lease.
Why do devices on another subnet still get DHCP addresses?
A DHCP relay agent, sometimes called an IP helper, forwards the client broadcast to a DHCP server on a different subnet and passes the reply back. That lets one server lease addresses for many VLANs without a server on every segment.

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