What is DHCP (Dynamic Host Configuration Protocol)?
DHCP automatically assigns IP addresses to devices on your network. Learn how the DORA process works, what lease time means, how to set up DHCP reservations, and why your router handles this by default.
Dynamic Host Configuration Protocol (DHCP) is the reason you can connect a new phone to your Wi-Fi and it works immediately. Without DHCP, someone would need to manually assign an IP address, a subnet mask, a default gateway, and DNS server addresses to every single device before it could communicate on the network. On a home network with 15 or 20 devices, that manual process would be tedious. On a corporate network with 500 to 10,000 devices, it would be unmanageable.
Your router runs a DHCP server by default. Every consumer router ships with the protocol enabled, a pool of IP addresses ready to hand out, and sensible defaults already configured. The entire process works in the background, finishing its job in milliseconds before you even see the Wi-Fi connected notification.
The DORA Process: How DHCP Assigns an Address
Address assignment happens through a four-step handshake known as DORA: Discover, Offer, Request, Acknowledge. The process runs every time a device connects to a network and needs an IP address.
Discover. Your device has just connected to Wi-Fi but has no IP address yet. It sends a broadcast message (a Discover packet) across the local network, essentially shouting: “Is there a server here? I need an IP address.” Since the device has no address of its own, it sends from 0.0.0.0 and broadcasts to 255.255.255.255.
Offer. The server (your router) hears the broadcast and responds with an Offer. This packet contains a proposed IP address (say, 192.168.1.105), the subnet mask (255.255.255.0), the default gateway (192.168.1.1), DNS server addresses, and the lease duration. The router checks its pool to make sure the offered address is not already in use.
Request. Your device receives the offer and responds with a Request, formally asking for the offered address. This step exists because there could be multiple servers on a network. The Request tells all servers which offer was accepted and which were declined.
Acknowledge. The server confirms the assignment with an Acknowledge (ACK) packet. Your device now has a fully configured network stack: IP address, subnet mask, gateway, and DNS servers. It can communicate on the local network and reach the internet.
The entire DORA process typically completes in under 100 milliseconds. It is the reason connecting to a network feels instantaneous.
Lease Time and Renewals
The protocol does not give your device an IP address permanently. Every assignment comes with a lease, a timer that determines how long the device can use that address before it must renew or give it back.
The default lease time varies by manufacturer. Most home routers set it between 24 hours and 7 days. Enterprise servers may use shorter leases (a few hours) in environments with high device turnover, like coffee shops or conference centres, or longer leases (several weeks) in stable office environments.
When a lease reaches 50% of its duration (the T1 timer), the device automatically attempts to renew it directly with the server that assigned it. If the server responds, the lease timer resets. The device keeps the same IP address.
If the renewal at T1 fails, the device tries again at 87.5% of the lease time (the T2 timer), this time broadcasting to any available server. If that also fails, the device uses the address until the lease expires, then starts the full DORA process over to get a new address.
For home networks, this renewal process is invisible. Your phone keeps the same IP address for days or weeks because the lease keeps renewing successfully. You only notice a change when you restart your router or the device disconnects for a long period.
DHCP Address Pool and Range
Your router’s server works from a defined pool of addresses. On a typical home router, the pool might be 192.168.1.100 through 192.168.1.254. The router will only assign addresses within this range to devices requesting them.
The addresses below the pool (192.168.1.1 through 192.168.1.99 in this example) are left available for devices with static IP configurations. This separation prevents conflicts. You can safely assign a printer the static IP 192.168.1.50 knowing the server will never hand that address to another device.
You can adjust the pool size and range in your router’s admin panel. If you only have a handful of devices, you might shrink the pool. If you want more addresses reserved for static assignment, expand the static range and shrink the address pool. The only requirement is that the pool and any static addresses do not overlap.
The router tracks all active leases in a table. You can view this table in the admin panel, usually under a section labelled “Connected Devices,” “Client List,” or “Attached Devices.” This list shows each device’s hostname, MAC address, assigned IP address, and lease expiration time.
DHCP Reservations
A DHCP reservation (sometimes called a static lease) is a way to guarantee that a specific device always receives the same IP address through address assignment. It combines the convenience of automatic configuration with the predictability of a static IP.
Reservations work by linking a device’s MAC address (its unique hardware identifier) to a specific IP address in the server’s configuration. When the device sends a Discover packet, the server recognizes its MAC address and always offers the same reserved address.
Common uses for reservations include:
- Printers and NAS drives that other devices need to find at a consistent address.
- Game consoles and PCs that need port forwarding rules, which point to a specific IP.
- Security cameras accessed through a fixed local address.
- Smart home hubs that other devices communicate with by IP.
To set up a reservation, log into your router’s admin panel. Go to the address assignment settings, find the reservation section, enter the device’s MAC address, and specify the IP address you want it to receive. The device will need to release and renew its lease (or reconnect) to pick up the reservation.
Reservations are preferable to manual static IP configuration on the device itself. With a reservation, the router still provides all network settings (subnet mask, gateway, DNS), so you cannot misconfigure them. If the network settings ever change, you update the router once rather than reconfiguring every static device.
Troubleshooting DHCP Problems
The protocol is reliable in normal operation, but problems do occur. Recognizing the symptoms saves troubleshooting time.
169.254.x.x address (APIPA). If your device shows an IP address starting with 169.254, it means address assignment failed. The device could not reach the server and fell back to Automatic Private IP Addressing. Common causes include a powered-off router, a Wi-Fi connection that appears active but is not passing traffic, or a rogue server on the network.
IP address conflict. Two devices with the same IP address will experience intermittent connectivity failures. This typically happens when someone configures a static IP that falls within the pool range. Ensure all static addresses are outside the pool.
Devices not appearing in the client list. If a device connects but does not show in the lease table, it may be using a manually configured static IP rather than requesting one through the protocol. Check the device’s network settings.
Running out of addresses. If every address in the pool is leased, the next device to connect will not receive an address. This is rare on home networks but can happen on crowded guest networks. Increase the pool size or reduce the lease time so abandoned leases expire faster.
Restarting the router clears the lease table and forces all devices to renegotiate. This is often the fastest fix for address assignment issues on home networks.
Frequently Asked Questions
What happens if DHCP fails?
If a device cannot reach the DHCP server, it assigns itself an APIPA address in the 169.254.x.x range. This address only allows communication with other devices on the same link that also have APIPA addresses. The device will have no internet access and no proper network connectivity until DHCP is restored or a static IP is configured.
Should I use DHCP or a static IP?
Use DHCP for most devices like phones, laptops, and tablets. Use static IPs or DHCP reservations for devices that need a consistent address, such as printers, NAS drives, game consoles for port forwarding, or servers. DHCP reservations give you the convenience of DHCP with the consistency of a static IP.
What is a DHCP lease?
A DHCP lease is the period of time a device is allowed to use a specific IP address. The default lease time varies by router but is typically 24 hours. When the lease expires, the device must request a renewal. If the device has left the network, the address returns to the available pool.
Can two devices get the same IP from DHCP?
A properly functioning DHCP server will not assign the same IP address to two devices. It tracks all active leases and only offers addresses that are currently unassigned. IP conflicts can occur if someone manually configures a static IP that falls within the DHCP range, or if two DHCP servers operate on the same network.
How do I find my DHCP settings?
Log into your router's admin panel (usually at 192.168.1.1 or 192.168.0.1) and look for DHCP settings under LAN or Network. You can view the address pool range, lease time, active leases, and any reservations. On your device, the IP address shown in network settings was assigned by DHCP unless you configured it manually.