Networking: DHCP (Dynamic Host Configuration Protocol)

Networking · Last updated · About 4 min read

What It Does

DHCP is a client-server protocol that automatically assigns IP addresses (and related configuration like subnet mask, default gateway, and DNS server addresses) to devices joining a network, eliminating the need to manually configure networking settings on every device by hand.

How It Works: DORA

DHCP address assignment follows a four-step exchange often remembered by the acronym DORA:

The DHCP DORA exchange and the lease timeline A device with no address broadcasts Discover; a DHCP server replies with Offer carrying an address, subnet mask, gateway and DNS; the device sends Request to accept it; the server sends Acknowledge. The lease that follows is renewed at about half its length with the original server, rebound later with any server, and expires at the end if neither succeeds. DORA: four messages to get an addressNew deviceDHCP serverDDiscoveris any DHCP server out there?broadcast — it has no address yetOOfferhere is an address, mask, gateway, DNSRRequestI will take that oneAAcknowledgeit is yours, for this longthe lease starts hereThe lease, and when the address can changeThe device keeps renewing long before the lease runs outin userenewingLease grantedaddress assignedRenew (T1)asks its own serverRebind (T2)asks any serverExpiresback to the poolRenewal normally hands back the same address, so a device keeps it indefinitely. It changes when thedevice is away past expiry, or when a different server answers the rebind — which is why anything otherdevices connect to needs a reservation or a static address.
A DHCP reservation pins one device to one address by its MAC address, giving a static address's predictability while the DHCP server stays in charge of the list.
  1. Discover — a device joining the network broadcasts a request asking if any DHCP server is present.
  2. Offer — a DHCP server responds, proposing a specific IP address along with subnet mask, gateway, and DNS server details.
  3. Request — the device confirms it wants to accept that specific offered address.
  4. Acknowledge — the DHCP server confirms and formally assigns the address to the device.

DHCP DORA sequence diagram showing Discover, Offer, Request, and Acknowledge messages between client and server

Leases, Renewal, and Reservations

A DHCP-assigned address isn't permanent — it's a lease for a defined duration set by the server. Well before the lease expires, the client tries to renew it (commonly attempting renewal with its original server around the halfway point of the lease, and if that fails, broadcasting to any available DHCP server later in the lease as a fallback "rebind" attempt) so that, under normal conditions, a device keeps the same address indefinitely through back-to-back renewals without ever needing to repeat the full DORA process. The address can still change, though — if a device is off the network past its lease expiry, or the original DHCP server is unreachable and a different server hands out a different address during rebind — which is exactly the "IP changed after a reboot/lease expiry" scenario referenced below.

A DHCP reservation combines DHCP's centralized management with a static address's predictability: the administrator configures the DHCP server to always hand a specific device (identified by its MAC address) the same IP address, every time, while that address is still technically served via DHCP rather than manually configured on the device itself. This is a common middle ground for infrastructure devices where centralized visibility/management is valuable but the address still needs to never change.

DHCP Across Multiple Subnets: Relay Agents

Because a DHCP client's initial Discover message is a broadcast, and routers don't forward broadcast traffic between subnets by default, a DHCP server can only directly hear Discover messages from clients on its own local subnet — unless a DHCP relay agent (often configured on a router as an "IP helper address") is set up on each other subnet. The relay agent listens for DHCP broadcasts on its local segment and forwards them as regular unicast packets to a central DHCP server elsewhere on the network, letting one DHCP server serve many subnets rather than requiring a dedicated DHCP server on every single segment.

Common Misunderstandings

  • "DHCP always gives the same device the same address" — only guaranteed with a reservation; otherwise a renewed lease is usually the same address (many servers try to re-offer a client's previous address) but is not guaranteed to be, especially after an extended absence from the network or if the original server becomes unavailable.
  • "Disabling DHCP secures the network" — not by itself; an attacker (or a legitimate device) can simply configure a static IP address manually. DHCP's presence or absence is an operational/management convenience, not an access-control mechanism — real access control belongs at the firewall/ACL or authentication layer, not the address-assignment layer.
  • "A static address left inside the active DHCP pool is harmless as long as no one else uses it yet" — it's a ticking time bomb: as documented in Troubleshooting RoIP and Gateway Connectivity, a static address that overlaps the DHCP pool eventually gets handed out to a DHCP client too, producing a duplicate-IP conflict with the classic symptoms of intermittent connectivity and flapping ARP entries. Always exclude statically-assigned addresses from the DHCP scope/pool.

References

See also: CTI product documentation

This article is part of the CTI Products Knowledge Base. Questions about RadioPro or MCN products? Call +1 (513) 595-5900 or email info@ctiproducts.com.

Informational only. This article is general background and is not engineering, safety, legal or regulatory advice. Verify requirements with the equipment manufacturer and the applicable authority before relying on it. Product names and trademarks belong to their respective owners.