Introduction
DHCPv4 gives a client an address and configuration options for a limited time. A correct pool must agree with the subnet plan, the relay's link information and the lease timers understood by the client.
Acquire a lease with DORA
A new client can broadcast DHCPDISCOVER on its local link. Eligible servers send DHCPOFFER messages. In the SELECTING exchange, the client broadcasts a DHCPREQUEST identifying its chosen server and requested address. The selected server returns DHCPACK if it can grant the lease.
Discover, Offer, Request and Acknowledge give the sequence its DORA mnemonic. An offer alone is provisional. A client restarting with remembered configuration may use another exchange, so four messages are a common initial path rather than a requirement for every transaction.
Connect a remote server using a relay
The initial limited broadcast stays on the client's link. A configured relay receives it and forwards a DHCP message to the server. In a conventional routed deployment the relay sets giaddr to identify its interface on the client subnet.
The server can select the correct pool using that link information and return its response through the relay. The options then supply settings such as mask, router and DNS servers. Reserve static addresses outside the dynamic pool or use explicit exclusions.
Follow the lease clock
At renewal time T1 a bound client normally unicasts DHCPREQUEST to the server that granted its lease. If unanswered, it can continue using its valid lease and retry. At T2 it enters rebinding and broadcasts so that another eligible server can respond.
Without an extension, the client must stop using the address when the lease expires. The usual default T1 and T2 fractions are one half and seven eighths of the lease. A server can supply different timers, and implementations can vary timings to avoid synchronized requests.
Diagram
- DISCOVER · client seeks settings
- OFFER · server proposes lease
- REQUEST · client selects offer
- ACK · server grants lease
Worked examples
Plan a relay-backed /27 pool and an eight-hour lease
- Use 192.0.2.64/27 on the client link. Reserve .65 for the router and relay, and .66–.69 for infrastructure. The dynamic interval .70–.94 contains 94 − 70 + 1 = 25 addresses.
- A relayed Discover bearing giaddr 192.0.2.65 identifies this client subnet to a central server. Suppose the lease begins at 08:00 with an eight-hour duration and default timer fractions.
- T1 is four hours later at 12:00. T2 is seven hours later at 15:00. If no renewal succeeds, the lease ends at 16:00. A successful ACK extends the lease according to the new parameters.
IP Range Calculator: Express 192.0.2.5 through 192.0.2.10 exactly
- The interval contains 10 − 5 + 1 = 6 addresses. The smallest single covering block is 192.0.2.0/28, spanning .0 through .15.
- Start with 192.0.2.5/32 because .5 is odd. Take 192.0.2.6/31 for .6–.7, then 192.0.2.8/31 for .8–.9. A /30 starting at .8 would pass the endpoint.
- Finish at 192.0.2.10/32. The four sizes sum to 1 + 2 + 2 + 1 = 6, with no gaps or overlap.
Reference table
| Client state | Typical request destination | Example time |
|---|---|---|
| Bound | Uses leased configuration | 08:00 |
| Renewing | Original server by unicast | 12:00 |
| Rebinding | Available servers by broadcast | 15:00 |
| Expired | Ceases use of expired address | 16:00 |
Configuration example
- Scope = 192.0.2.64/27
- Pool = 192.0.2.70 through 192.0.2.94
- Router and relay giaddr = 192.0.2.65
- DNS server = 192.0.2.66
- Lease = 28,800 seconds
Common mistakes
- Including the router or directed broadcast address in a dynamic pool.
- Treating a missed T1 renewal as immediate expiry and overlooking the rebinding interval.
Frequently asked questions
What helps a centralized server choose a pool for a new client?
For a conventional relay, giaddr identifies the client-facing subnet. The server maps that information to a configured scope. Directly attached requests can use the receiving interface context.
What do UDP ports 67 and 68 identify?
DHCPv4 uses UDP port 67 for the server and UDP port 68 for the client. A relay introduces an additional server-facing exchange.
What are the usual DHCPv4 address-allocation steps?
A common exchange is Discover, Offer, Request, Acknowledgment. A client broadcasts discovery, receives an offer, requests a lease, and waits for the server's acknowledgment.
Is a DHCP reservation the same as a manually configured static address?
A reservation tells the DHCP server to offer a planned address to a matching client identifier or hardware address. The client still obtains its settings through DHCP.
What can cause a duplicate IPv4 address?
A manually assigned value can overlap a dynamic pool, a reservation can be misconfigured, or a client can retain stale configuration. Check the server scope and the local address assignment.
Does DHCP usually provide the default gateway and DNS resolver?
It can provide those configuration options along with an address and lease information. The actual options depend on the server and network configuration.
What happens when a DHCP lease approaches renewal?
A client normally attempts to renew its lease with the server that granted it, then can broaden the request if that server is unavailable. Exact timers and behavior depend on the protocol and implementation.
Why does a DHCP relay exist?
A relay forwards client configuration messages between a local broadcast domain and a DHCP server on another network, because ordinary IP routers do not forward local broadcast traffic by default.
Can a device have an address without DHCP?
Yes. An administrator can configure an address manually, or another protocol or mechanism can assign it. That address still needs to fit the network plan and avoid conflicts.
Does DHCPv6 provide the same default-router setting as DHCPv4?
IPv6 default-router information is normally learned from Router Advertisements. DHCPv6 can provide other configuration such as addresses or DNS information, depending on the network design.
What does a DHCP lease reserve?
It temporarily associates an address and configuration with a client according to the server's lease policy. The client must renew or reacquire the lease to keep using it.
Can a DHCP scope include an address already configured manually?
It should not. Exclude manually assigned addresses or reserve them through the server so the dynamic pool does not offer the same address to another client.
What happens if two DHCP servers answer the same client?
The client may receive competing offers and select one according to its behavior. Misconfigured servers can provide inconsistent gateways, DNS, or address pools, so coordinate authoritative DHCP service.
Why does a client sometimes receive a 169.254.x.x address?
Some operating systems use IPv4 link-local address assignment when DHCP fails. It supports limited local-link communication and does not provide ordinary routed connectivity.
Can DHCP options be different between subnets?
Yes. A server can use scopes or relay information to select subnet-specific pools and options, such as gateways, DNS resolvers, or boot parameters.

