Work from the client to the server
- Client:
ipconfig /all. Is DHCP enabled? APIPA address? Which DHCP server? Which gateway and DNS? - Link and VLAN: is the PC's switch port up, and in the right VLAN?
- Relay: if the server is in another subnet, does the router interface facing the clients have
ip helper-address, with the right server address? - Server:
show ip dhcp pool(is there a pool whose network matches the client's subnet, or the relay's giaddr? are there free addresses?),show ip dhcp binding,show ip dhcp conflict. - Routing: can the server reach the relay's address to answer?
| Symptom | Likely cause |
|---|---|
| 169.254.x.x (Windows/macOS), no address (Linux) | No server reached: link, VLAN, helper address, server down, no pool for this subnet |
| Address OK, can't leave the LAN | Wrong default-router in the pool |
| Address OK, names don't resolve | Wrong or missing dns-server |
| Some clients get addresses, new ones don't | Pool exhausted (show ip dhcp pool: leased = total) |
| Address from the wrong subnet | Wrong network in the pool, or the port is in the wrong VLAN |
Conflicts
Here the pool has no excluded addresses, and a printer was given 192.168.10.2 by hand. Before offering an address the router pings it; when something answers, it records a conflict, skips that address, and offers the next one:
In NetLab
▶ R1 R1>enable R1#show ip dhcp conflict IP address Detection method Detection time VRF 192.168.10.1 Ping Mar 01 1993 12:00 AM 192.168.10.2 Ping Mar 01 1993 12:00 AM R1#show ip dhcp binding Bindings from all pools not associated with VRF: IP address Client-ID/ Lease expiration Type Hardware address/ User name 192.168.10.3 0100.1a33.d562.b1 Mar 02 1993 12:00 AM Automatic
Both .1 (the router's own address: nothing excluded it) and .2 (the printer) answered the ping, so PC1 got .3. Clear the conflict list with clear ip dhcp conflict * once you have fixed the cause by excluding the static addresses. It's better to exclude every static address from the start.