The most surprising thing about DHCP is that it doesn’t actually assign IP addresses; it brokers a deal between clients and servers, with the actual assignment being a temporary lease.

Let’s watch this in action. Imagine a new device, a laptop, boots up on a network. It has no IP address. It needs one to talk to anything beyond its immediate local segment. So, it broadcasts a DHCP Discover message. This is like shouting into the void, "Is there a DHCP server out there? I need an IP address!"

DHCP Discover (Client Broadcast)
  Source IP: 0.0.0.0 (client doesn't have one yet)
  Destination IP: 255.255.255.255 (broadcast to all devices)
  Option 53: DHCP Message Type (Discover)
  Option 61: Client Identifier (MAC address of the laptop)

Somewhere on the network, a DHCP server hears this. It checks its pool of available IP addresses. If it has one, it offers it back to the client with a DHCP Offer. This isn’t an assignment yet, just a proposal. It includes the IP address, lease duration, and other network configuration details like the subnet mask and default gateway.

DHCP Offer (Server Unicast to Broadcast)
  Source IP: DHCP Server's IP (e.g., 192.168.1.1)
  Destination IP: 255.255.255.255 (client may not have an IP to receive unicast)
  Your IP: 192.168.1.100 (the offered IP address)
  Lease Time: 86400 seconds (24 hours)
  Subnet Mask: 255.255.255.0
  Router: 192.168.1.1

The laptop receives the offer. If it likes it (and usually there’s only one offer for a client), it broadcasts a DHCP Request. This confirms its acceptance of the offer and tells the server, "Yes, I’ll take that IP address." It also informs any other DHCP servers that might have also sent an offer that their offers are now declined.

DHCP Request (Client Broadcast)
  Source IP: 0.0.0.0 (client still doesn't have an IP)
  Destination IP: 255.255.255.255
  Option 53: DHCP Message Type (Request)
  Option 50: Requested IP Address (192.168.1.100)
  Option 54: Server Identifier (DHCP Server's IP: 192.168.1.1)

Finally, the DHCP server sends a DHCP Acknowledge. This is the official confirmation. The IP address is now leased to the client for the specified duration. The server records this assignment in its database.

DHCP Acknowledge (Server Unicast to Broadcast)
  Source IP: DHCP Server's IP (192.168.1.1)
  Destination IP: 255.255.255.255
  Your IP: 192.168.1.100
  Lease Time: 86400 seconds
  Subnet Mask: 255.255.255.0
  Router: 192.168.1.1

This whole dance is called the DORA process: Discover, Offer, Request, Acknowledge. It’s a handshake for network identity.

The fundamental problem DHCP solves is the manual configuration nightmare of IP addresses. Imagine a network with hundreds of devices. Assigning each one a unique IP, subnet mask, gateway, and DNS server by hand would be incredibly tedious, error-prone, and impossible to manage as devices join and leave. DHCP automates this, making network management scalable. Internally, DHCP servers maintain a database of IP address pools, which clients are currently leased which addresses, and when those leases expire. They also store configuration options like DNS server addresses, domain names, and NTP servers, which are broadcast to clients.

The levers you control with DHCP are primarily the IP address pools it manages, the lease times, and the configuration options it provides. You can define multiple scopes (ranges of IP addresses) for different subnets, set short lease times for highly dynamic environments like public Wi-Fi or long ones for stable corporate networks. You can also push specific DNS servers, WINS servers, or even custom vendor-specific options to clients.

What most people don’t realize is how DHCP handles clients that already have an IP address when they join the network. If a device boots up with a static IP address, it will first send an ARP probe (Address Resolution Protocol) to see if that IP is already in use. If it’s not, it assumes it’s free. If it is in use, it will then try to get an IP address via DHCP. If the device has a DHCP-assigned IP address and it comes back online, it will typically send a DHCP Request for its previous IP address. The DHCP server will check its lease table and, if the lease is still valid or the IP is available, will renew it. If the client doesn’t get an ACK for its requested IP, it will then broadcast a DHCP Discover, starting the full DORA process.

The next concept to grapple with is DHCP failover and high availability, ensuring that network connectivity doesn’t disappear if your primary DHCP server goes offline.

Want structured learning?

Take the full Computer Networking course →