The Dynamic Host Configuration Protocol (DHCP) is responsible for providing IP addresses, subnet masks, default gateways, and DNS servers to client devices. When DHCP fails, devices cannot communicate on the network.
The DORA Process (A Brief Recap)
To troubleshoot DHCP, you must understand how a client gets an address:
- Discover: The client boots up and shouts a Broadcast message to the entire local network: "Are there any DHCP servers here?"
- Offer: The DHCP server hears the broadcast and replies: "I am here, and I can offer you IP 192.168.1.50."
- Request: The client replies: "I accept that IP."
- Acknowledge (ACK): The server confirms: "It is yours. Here is your lease time, Gateway, and DNS."
Because the initial Discover is a broadcast, it cannot cross a router. If the DHCP server is on a different VLAN than the client, the router must be configured with a DHCP Relay (IP Helper) to intercept the broadcast and forward it directly to the server as a unicast packet.
Common Symptoms and Causes
- APIPA (169.254.x.x): If a Windows machine is configured for DHCP but fails to contact a server (or the server ignores it), Windows automatically assigns itself an Automatic Private IP Address (APIPA) in the
169.254.0.0/16range. If you see this, DHCP is completely failing. - Scope Exhausted: A guest Wi-Fi network has a /24 subnet (254 addresses), but 300 guests arrive. The DHCP server runs out of addresses in the "Scope" and stops replying to Discover messages.
- Wrong Gateway or DNS: The client receives an IP, but cannot reach the internet or resolve names. The DHCP Server's "Options" are misconfigured.
- Only One VLAN Affected: If VLAN 10 gets IPs but VLAN 20 gets APIPA, the DHCP server is online, but the router's DHCP Relay configuration on VLAN 20 is missing or pointing to the wrong IP.
- Duplicate IP Address: A user hardcoded a static IP on their laptop that the DHCP server had already leased to a printer.
Practical Troubleshooting Sequence
- Confirm Physical/Link Connectivity: A PC with a disconnected cable or a switch port in the wrong VLAN will never reach the server.
- Check Client IP State: Is the PC holding an old lease, an APIPA address, or a completely static IP?
- Renew the Lease: Force the client to drop its IP and restart the DORA process.
- Check DHCP Server Availability: Can you ping the DHCP server from a static machine on the same VLAN?
- Check the Scope: Log into the DHCP server. Are there available addresses in the pool?
- Check DHCP Relay / Helper: If the server is on a remote subnet, verify the router interface has the correct IP Helper address applied.
- Check Firewall / ACLs: DHCP uses UDP Ports 67 and 68. Ensure internal firewalls are not blocking these broadcasts or relay packets.
- Check Server Logs: Is the server actually receiving the Discover messages but refusing to reply due to a MAC address filter or reservation mismatch?
- Verify Options: Ensure the server is handing out the correct Default Gateway and DNS servers for that specific scope.
Useful Diagnostic Commands
Windows
ipconfig /all # View IP, Mask, Gateway, DNS, and DHCP Lease times
ipconfig /release # Surrender the current DHCP lease
ipconfig /renew # Send a new DHCP Request/Discover
ipconfig /release # Surrender the current DHCP lease
ipconfig /renew # Send a new DHCP Request/Discover
Linux
Note: Linux network management varies heavily. NetworkManager handles this automatically on desktop distros.
ip addr # View current IP assignments
ip route # View the default gateway
sudo dhclient -r # Release lease (on systems using dhclient)
sudo dhclient # Renew lease (on systems using dhclient)
journalctl -u NetworkManager # View network connection logs conceptually
ip route # View the default gateway
sudo dhclient -r # Release lease (on systems using dhclient)
sudo dhclient # Renew lease (on systems using dhclient)
journalctl -u NetworkManager # View network connection logs conceptually