How DHCP works comes down to a four-message exchange that finishes before your Wi-Fi icon stops spinning. Your device joins a network, asks for an address, and gets one, all without you touching a setting. This guide walks through that handshake, the lease timers behind it, and the settings worth changing.
The payoff is practical. When a device lands on a 169.254 address, you will know which step failed. When leases drop at the same time every day, you will know where to look.
- DHCP assigns IP addresses automatically through a four-message handshake called DORA: Discover, Offer, Request, and Acknowledge.
- Addresses are leased, not owned. Clients renew at 50 percent of the lease and rebind at 87.5 percent.
- Beyond the address, DHCP delivers the subnet mask, default gateway, and DNS servers as numbered options.
- Use DHCP reservations for home lab gear and true static addresses only for core infrastructure.
- A 169.254.x.x address means DHCP failed. Start with physical checks, then release and renew the lease.
What DHCP Does and Why Every Network Depends on It
DHCP, the Dynamic Host Configuration Protocol, automatically assigns IP addresses and network settings to devices joining a network. Defined in RFC 2131, it replaces manual configuration with a four-message exchange. Nearly every home and office network depends on it.
DHCP stands for Dynamic Host Configuration Protocol. It is a client-server protocol published as RFC 2131 in March 1997. The server side usually lives inside your router. On larger networks it runs on dedicated software such as Windows Server or Kea.
A device that joins the network needs four things before it can do anything useful. It needs an IP address, a subnet mask, a default gateway, and at least one DNS server. DHCP delivers all four in a single exchange. Our guide to public and private IP addresses explains where those pool addresses come from.
The protocol runs over UDP. Servers listen on port 67, and clients send from port 68. Every lease is tied to the client’s MAC address, the hardware identifier burned into its network card. Our MAC address guide covers how those identifiers work and how randomization changes them.
How DHCP Works Step by Step: The DORA Handshake
DHCP works through a four-message exchange called DORA: Discover, Offer, Request, and Acknowledge. The client broadcasts a request, servers offer addresses, the client accepts one, and the server confirms the lease. The whole handshake usually completes in under a second.
The handshake has a memorable name. Network engineers call it DORA, after the first letter of each message. Here is what each step actually does.
Step 1: DHCPDISCOVER
The client has no address yet, so it cannot send normal traffic. It broadcasts a DHCPDISCOVER from source address 0.0.0.0 to destination 255.255.255.255. Every device on the local segment hears it, but only DHCP servers answer.
Step 2: DHCPOFFER
Each listening server picks a free address from its pool and proposes it. The DHCPOFFER carries the candidate address, the lease length, and the core options. If two servers exist on the segment, the client may receive two offers.
Step 3: DHCPREQUEST
The client accepts one offer, almost always the first to arrive. It broadcasts a DHCPREQUEST naming the winning server. The broadcast matters. It tells every losing server to return its offered address to the pool.
Step 4: DHCPACK
The chosen server records the lease and replies with a DHCPACK. The ACK confirms the address and starts the lease clock. Many clients then send a quick ARP probe to confirm nothing else is using the address. From that moment the device is fully configured and online.
Renewals skip most of this. A client with an active lease sends a unicast DHCPREQUEST to its server. The server answers with an ACK, and the lease resets. You can watch the whole exchange in Wireshark with the display filter dhcp.
DHCP Lease Times: T1 Renewal and T2 Rebinding
A DHCP lease is a timed loan of an IP address. The client tries to renew with its original server at 50 percent of the lease, called T1. At 87.5 percent, called T2, it broadcasts to any server. At expiration, it must stop using the address.
Think of a lease as a timed loan. The DHCPACK includes option 51, the lease duration in seconds. Most home routers default to 24 hours, though administrators can set anything.
Two timers run underneath, defined directly in RFC 2131:
- T1, the renewal timer, fires at 50 percent of the lease. The client unicasts a DHCPREQUEST to its original server and usually gets a fresh lease on the spot.
- T2, the rebinding timer, fires at 87.5 percent. The original server has gone quiet, so the client broadcasts to any server that will extend the lease.
- Expiration ends everything. The client must stop using the address immediately and restart the full DORA process.
RFC 2131 also tells clients to add a little random jitter to those timers. Without it, hundreds of clients would hammer the server at the same instant after an outage.
You can see your own lease on Windows with ipconfig /all:
Ethernet adapter Ethernet0:
DHCP Enabled. . . . . . . . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.1.147
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Friday, July 3, 2026 8:14:02 AM
Lease Expires . . . . . . . . . . : Saturday, July 4, 2026 8:14:02 AM
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
Need to force a renewal right now? Our Windows network reset commands guide lists the exact release and renew sequence. Then confirm the result with the My IP Address tool.
Lease length is a real design decision. Coffee shops run short leases, often 30 to 60 minutes, so departed phones free their addresses quickly. Offices with stable wired desks can run leases of several days. A pool that runs out of addresses stops answering new devices entirely.
DHCP Options: More Than Just an IP Address
DHCP delivers more than an IP address. Numbered options carry each remaining setting. The mask is option 1, the gateway is option 3, DNS is option 6, and lease time is option 51. IANA maintains the registry of every assigned option number.
Every extra setting in the handshake travels as a numbered option. The client lists the options it wants, and the server fills in what it knows. These are the ones you will meet most often:
| Option | Name | What it carries |
|---|---|---|
| 1 | Subnet mask | The mask that defines the local network boundary |
| 3 | Router | The default gateway address for off-network traffic |
| 6 | DNS servers | One or more resolvers the device should query |
| 15 | Domain name | The local DNS suffix appended to short hostnames |
| 51 | Lease time | How long the address assignment lasts, in seconds |
| 66 and 67 | Boot server and file | Where PXE clients fetch their network boot image |
| 108 | IPv6-Only Preferred | A timer telling capable clients to switch off IPv4 |
Option 6 is why your resolver settings follow you between networks. See how DNS works for what happens after the handshake. Option 1 pairs with our subnet calculator when you need to size a pool. IANA maintains the complete registry of assigned option numbers.
DHCP Reservations vs. Static IP Addresses
A DHCP reservation pins a fixed IP to a device’s MAC address inside the server, so configuration stays centralized. A static IP is set on the device itself and survives DHCP outages. Reservations suit most home labs, while true statics suit infrastructure.
A reservation is a rule inside the DHCP server. It says one MAC address always receives one specific IP address. The device still runs plain DHCP and never knows the difference.
A static IP is typed into the device itself. The device never asks the server for anything.
| DHCP reservation | Static IP | |
|---|---|---|
| Where it is configured | On the DHCP server, tied to the MAC address | On the device itself |
| Survives a DHCP outage | No new leases while the server is down | Yes |
| Conflict risk | Low, because the server manages the pool | High if the address sits inside the pool |
| Best for | Printers, NAS boxes, cameras, home lab services | Routers, the DHCP server, core infrastructure |
For a home lab, reserve almost everything that needs a fixed address. Printers, NAS boxes, cameras, and Raspberry Pi services all behave well on reservations. Keep true statics for the router, the DHCP server itself, and anything the network cannot boot without. One rule prevents most conflicts: keep every static address outside the DHCP pool range.
What Happens When DHCP Fails
When no DHCP server answers, a device assigns itself a 169.254.x.x APIPA address and loses internet access. The fix is almost always physical checks, a router reboot, or a lease release and renew from the operating system.
DHCP failure has one unmistakable signature. The device gives up waiting, invokes APIPA, and assigns itself an address in the 169.254.0.0/16 range. RFC 3927 defines that link-local behavior. Our 169.254 address guide covers the recovery steps in full.
The usual causes are mundane:
- The router or DHCP server is down or still rebooting.
- The address pool is exhausted, so there is nothing left to lease.
- A loose cable or a failed Wi-Fi join stopped the Discover from arriving.
- The DHCP Client service on the device is stopped or hung.
Work the fix in order. Check the physical link first, then reboot the router, then release and renew the lease. If the problem sits deeper, our network troubleshooting guide walks the full decision tree.
The security angle: rogue DHCP servers
Rogue DHCP servers are a classic attack. An attacker answers Discover messages faster than the real server and hands out a malicious gateway. Managed switches counter this with DHCP snooping, which drops server messages from untrusted ports.
DHCPv6, SLAAC, and Option 108: Where DHCP Is Heading
IPv6 splits the job between SLAAC and DHCPv6, which is defined in RFC 8415. Android still skips DHCPv6 addressing, so mixed networks lean on SLAAC. Meanwhile, DHCPv4 Option 108 from RFC 8925 lets modern devices switch off IPv4 on IPv6-mostly networks.
IPv6 never fully committed to DHCP. Most IPv6 hosts self-configure through SLAAC, stateless address autoconfiguration driven by router advertisements. DHCPv6, defined in RFC 8415, still exists for networks that want centralized address control.
The catch is client support. Android does not implement DHCPv6 address assignment, and that remains true in 2026. Any network with phones on it must therefore keep SLAAC available.
Option 108 is the newest twist, standardized in RFC 8925 in October 2020. A capable client requests the option during the normal DHCPv4 handshake. If the network supports IPv6-only operation, the server replies with a timer and the client shuts off IPv4. Recent Android, iOS, and macOS versions all request it by default. One RIPE conference network measured about 65 percent of devices asking for it. Engineers call the resulting design an IPv6-mostly network.
The server side changed too. ISC ended maintenance of its classic DHCP server at the close of 2022. Its successor, Kea, carries the work forward. Projects like pfSense have been migrating to it since 2023. If you run a home lab DHCP server today, Kea is the one to learn.
Related Tools
These free NetworkCheckr tools put the concepts in this guide to work. Confirm the address your DHCP server handed out. Then calculate the subnet behind your lease, and identify devices by the MAC tied to each one.
- My IP Address — Confirm the address your DHCP lease handed out.
- Subnet Calculator — Size the pool behind your lease and check the mask from option 1.
- MAC Address Lookup — Identify the vendor behind any MAC in your lease table.
- DNS Lookup — Test the resolvers your DHCP server assigned through option 6.
- All Network Tools — The full free toolkit in one place.
Frequently Asked Questions
Short answers to the questions people ask most about how DHCP works. Each one expands on a point covered above. They run from the meaning of DORA to lease length, expiration, static addressing, and DHCP ports.
What does DHCP stand for and what does it do?
DHCP stands for Dynamic Host Configuration Protocol. It is the service that hands a joining device its IP address, subnet mask, gateway, and DNS servers. Without it, every device would need those settings typed in by hand. RFC 2131 defines the protocol, and nearly every home router runs a DHCP server today.
What is the DORA process in DHCP?
DORA stands for Discover, Offer, Request, and Acknowledge. Those are the four messages a client and server exchange to create a lease. The client broadcasts a Discover, servers respond with Offers, the client Requests one offer, and the server sends an Acknowledgment. The full exchange normally finishes in well under one second.
How long does a DHCP lease last?
Lease length is set by the network administrator, so there is no single answer. Most home routers default to 24 hours. Guest networks and busy public Wi-Fi often use much shorter leases to recycle addresses faster. Enterprise networks may run leases of several days for stable wired clients.
What happens when a DHCP lease expires?
A client tries to renew long before expiration, first at 50 percent of the lease and again at 87.5 percent. If every attempt fails and the lease expires, the client must stop using the address immediately. It then restarts the full DORA process from scratch. If no server ever answers, the device falls back to a 169.254.x.x APIPA address.
Should I use DHCP or a static IP address?
Use DHCP for almost everything, and add reservations for devices that need a fixed address. A reservation keeps the configuration on the server, which is easier to manage and audit. Save true static addresses for core infrastructure like the router, the DHCP server itself, and critical servers. Always keep static addresses outside the DHCP pool range to avoid conflicts.
What ports does DHCP use?
DHCP for IPv4 uses UDP port 67 on the server side and UDP port 68 on the client side. DHCPv6 uses UDP port 547 for servers and relay agents and UDP port 546 for clients. Firewall rules that block these ports will silently break address assignment on the network.
References
Primary sources for every dated claim in this guide. RFC 2131 defines DHCP for IPv4, RFC 8415 defines DHCPv6, and RFC 8925 defines Option 108. IANA maintains the option registry, and ISC documents its classic server’s retirement.
- RFC 2131 — Dynamic Host Configuration Protocol. rfc-editor.org/rfc/rfc2131
- RFC 8415 — Dynamic Host Configuration Protocol for IPv6 (DHCPv6). rfc-editor.org/rfc/rfc8415
- RFC 8925 — IPv6-Only Preferred Option for DHCPv4. rfc-editor.org/rfc/rfc8925
- RFC 3927 — Dynamic Configuration of IPv4 Link-Local Addresses. rfc-editor.org/rfc/rfc3927
- IANA — BOOTP and DHCP Parameters registry. iana.org
- ISC — ISC DHCP end-of-maintenance notice. isc.org/dhcp