Learning Objectives
- Describe the four steps of the DHCP DORA process
- Understand how DHCP assigns IP addresses automatically
- Calculate appropriate DHCP scope sizes for different network sizes
- Explain the role of DHCP lease times and renewal
Automatic Addressing
Manually configuring IP addresses on every device in a network is impractical. In a home network with phones, laptops, tablets, smart TVs, and IoT devices, you'd need to track every address and ensure no duplicates exist. Dynamic Host Configuration Protocol (DHCP) solves this by automating IP address assignment.
When a device connects to a network, it broadcasts a request for an IP address. A DHCP server responds with an available address from its configured pool (called a scope), along with other network parameters like the subnet mask, default gateway, and DNS servers.
DORA — The Four-Step DHCP Process
The DORA Process in Detail
Discover: A client that has no IP address sends a broadcast packet (destination 255.255.255.255) from source 0.0.0.0. This packet asks "Is there a DHCP server here? I need an address." Because it's a broadcast, every device on the subnet sees it, but only DHCP servers respond.
Offer: The DHCP server reserves an available IP address from its scope and sends an offer back. The offer includes the proposed IP, subnet mask, lease duration, and optional parameters like gateway and DNS. Since the client has no IP yet, the offer is also broadcast.
Request: If the client receives multiple offers (from multiple servers), it picks one and broadcasts a request accepting that specific offer. This broadcast lets all DHCP servers know which offer was accepted so others can release their offers.
Ack: The chosen server acknowledges with a DHCPACK, finalizing the lease. The client now configures its network interface with the assigned IP and parameters.
Arrange the DHCP DORA steps in the correct order.
DHCP Scope Sizing
A DHCP scope defines the range of IP addresses available for assignment. Sizing a scope correctly is critical — too small and you run out of addresses; too large and you waste IP space. You must account for reserved addresses (servers, printers, network equipment with static IPs), the gateway address, and a buffer for growth.
Common DHCP lease times: 24 hours for general clients, 30 minutes for guest Wi-Fi, and 8 days for stable office desktops. When half the lease time expires, the client attempts to renew with the same server.
Design a DHCP scope for an office with 140 employees who each have a laptop and a phone. Network equipment (switches, APs, printers) uses 15 static IPs, and the gateway uses the first usable address. What is the minimum subnet size needed?
DHCP Relay and Multiple Subnets
DHCP uses broadcasts, which don't cross router boundaries by default. In networks with multiple subnets, a DHCP relay agent (often configured on the router) forwards DHCP broadcasts from clients to a central DHCP server on another subnet. The relay adds the client's subnet information (GIADDR field) so the server knows which scope to assign from.
Key Takeaways
- DORA (Discover, Offer, Request, Ack) is the four-step DHCP handshake
- DHCP scopes define the pool of available addresses per subnet
- Account for static reservations, gateways, and growth when sizing scopes
- DHCP relay enables a single server to serve multiple subnets
- Leases are renewed at 50% of the lease duration