ENGINEERING GUIDE · NETWORK FUNDAMENTALS

DHCP Fundamentals

Understand how DHCP automatically configures network clients, from the DORA exchange through scopes, leases, relay agents, failover and security.

8 min readNetworking fundamentalsIngenix guide

DHCP is one of the fundamental services of networks. Without it, users would need to assign their own IP address, or administrators would need to do it for them.

Either way would be an administrative nightmare. IP conflicts would be commonplace.

Even home networks would require knowledge of IP ranges, gateways and DNS settings. Thankfully, DHCP, or Dynamic Host Configuration Protocol, automates this process. DHCP is built into all home routers, while enterprise DHCP servers handle the assignment of IP addresses across multiple VLANs.

As network administrators, we still need to understand how DHCP works, what can break it, how leases work, how scopes work, and what settings are available to us.

DORA

The DHCP process is often referred to as DORA, which stands for Discovery, Offer, Request, Acknowledgement. DORA is the four-step handshake used for a device to obtain an IP address.

Discovery

The client joins the network and wants an IP address because it has no static configuration. It doesn't know anything about the network, especially who is providing IP addresses.

It sends a DHCP Discover message. This is both a Layer 2 broadcast message, using destination MAC address FF:FF:FF:FF:FF:FF, and a Layer 3 broadcast packet, using destination IP 255.255.255.255. DHCP uses UDP ports 67 and 68. The broadcast is necessary because the client does not initially know where the DHCP server is.

Offer

A DHCP server receiving the Discover checks its lease table and reserves an available address. It sends a DHCP Offer containing the proposed IP address and configured options, commonly including the default gateway and DNS server addresses.

Request

The Offer is exactly that: an offer. If multiple DHCP servers are present, the client may receive more than one. The client responds to the offer it chooses with a DHCP Request. This is also broadcast so that other DHCP servers can see that their offers were not selected and cancel any temporary reservations.

Acknowledgement

The DHCP server sends a DHCP Acknowledgement confirming the configuration. It includes the options again and the lease time: the length of time the client is allowed to use the address before it needs to renew it.

The client configures its network stack with the supplied settings and can then communicate normally.

DHCP Options

One of the most important features of DHCP is its ability to provide additional network configuration. An IP address alone is not enough for a client to communicate beyond its local subnet.

DHCP options are defined in RFC 2132. Common options include the subnet mask (option 1), default gateway (option 3) and DNS servers (option 6).

A DHCP client can also provide a Parameter Request List, DHCP option 55, indicating which options it would like the server to provide. The server includes the relevant options when they are configured.

DHCP Relay

Broadcast traffic does not normally traverse routers. It is contained within the local network segment. This is important because allowing broadcasts from every subnet to reach every other subnet would create unnecessary broadcast traffic.

But what happens when the DHCP server is on a different subnet? This is common in enterprise networks, where servers are normally kept separate from client devices.

The solution is a DHCP relay. The router or Layer 3 switch is configured with a DHCP helper address. When it receives the client's DHCP broadcast, it forwards the request towards the DHCP server as a unicast or relayed request. The server can then determine which client subnet the request came from and allocate an address from the appropriate scope.

Engineering tip: When troubleshooting DHCP across VLANs, check the client VLAN's Layer 3 interface and confirm that the correct DHCP relay/helper address is configured.

DHCP Scopes

A DHCP scope defines the pool of addresses available for clients on a particular network. It normally contains the subnet, the range of addresses that can be allocated, exclusions, lease settings and DHCP options.

For example, a client VLAN might use 192.168.10.0/24, with the DHCP scope allocating a defined portion of that subnet while reserving addresses for infrastructure devices that require static addressing.

Good scope design avoids overlapping pools, leaves room for static infrastructure and makes it clear which addresses are intended for clients.

DHCP Leases

A DHCP lease gives a client temporary use of an address. The lease has a defined duration, after which the client must renew it if it still needs the address.

This allows DHCP servers to reuse addresses when devices leave the network. It also means that changing a DHCP scope or reservation does not necessarily affect a client immediately: an existing lease can remain valid until renewal or expiry.

When troubleshooting an address that appears to be incorrectly assigned, check the server's active lease table and the client's current lease information.

DHCP Failover

DHCP can become a critical dependency. If there is only one DHCP server and it fails, clients may be unable to obtain or renew their network configuration.

DHCP failover allows two DHCP servers to share responsibility for scopes. The exact implementation varies between platforms, but the objective is the same: maintain service if one DHCP server becomes unavailable while keeping address allocation coordinated.

For enterprise networks, DHCP availability should be considered alongside DNS, routing and other services required for a client to function.

DHCP Security

Because DHCP is fundamental to network connectivity, an unauthorised DHCP server can cause significant problems. A rogue server can offer clients incorrect gateways, DNS servers or IP addresses.

Switches can provide DHCP Snooping to help defend against this. The switch identifies trusted ports, normally those leading towards legitimate DHCP infrastructure, and blocks DHCP server responses arriving on untrusted ports.

DHCP Snooping can also build a binding table containing information such as the client MAC address, assigned IP address, VLAN and switch port. This information can support other security features such as Dynamic ARP Inspection and IP Source Guard, depending on the switch platform.

Engineering tip: If DHCP suddenly starts assigning unexpected gateways or DNS servers, investigate for a rogue DHCP server and check the switch's DHCP Snooping configuration and bindings.

Conclusion

DHCP is simple from a user's perspective, but it sits at the heart of network connectivity. Understanding DORA, options, relay agents, scopes, leases, failover and DHCP security gives you the foundation needed to troubleshoot clients that cannot obtain an address or receive incorrect network configuration.

When DHCP fails, work through the path logically: is the client sending Discover traffic, is it reaching the correct Layer 3 interface, is the request being relayed to the expected server, does the correct scope have addresses available, and is the server returning the expected configuration?

That approach turns DHCP troubleshooting from guesswork into a structured network-engineering problem.