Troubleshooting DHCP

Work from the client to the server

  1. Client: ipconfig /all. Is DHCP enabled? APIPA address? Which DHCP server? Which gateway and DNS?
  2. Link and VLAN: is the PC's switch port up, and in the right VLAN?
  3. Relay: if the server is in another subnet, does the router interface facing the clients have ip helper-address, with the right server address?
  4. 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.
  5. Routing: can the server reach the relay's address to answer?
SymptomLikely 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 LANWrong default-router in the pool
Address OK, names don't resolveWrong or missing dns-server
Some clients get addresses, new ones don'tPool exhausted (show ip dhcp pool: leased = total)
Address from the wrong subnetWrong 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.

HOME LABS COMMUNITY DASHBOARD