When a client machine repeatedly sends DHCPDISCOVER messages and receives DHCPOFFER responses but never completes the process with DHCPACK, we're looking at a breakdown in the four-step DHCP handshake (DORA process). This typically indicates either network communication issues or server configuration problems.
The provided dhcpd.conf shows several potential issues that could cause this behavior:
# Key configuration elements to examine:
authoritative;
ddns-update-style none;
deny duplicates;
# Problematic pool declarations:
pool {
max-lease-time 300;
range x.x.x.250 x.x.x.254;
deny known-clients; # This might block valid clients
}
From experience, these are the most likely culprits:
- The
deny known-clients
in the testing pool might be interfering - Missing or incorrect subnet declarations
- Firewall blocking UDP ports 67/68
- IP address conflicts in the range
Here's how I would restructure the configuration:
subnet x.x.x.128 netmask 255.255.255.128 {
option subnet-mask 255.255.255.128;
option routers x.x.x.129;
# Static hosts pool
pool {
range x.x.x.200 x.x.x.220;
allow known-clients;
default-lease-time 1800;
}
# Dynamic pool
pool {
range x.x.x.250 x.x.x.254;
deny known-clients;
default-lease-time 300;
}
}
After making changes:
# Restart DHCP service
sudo systemctl restart isc-dhcp-server
# Check logs for errors
journalctl -u isc-dhcp-server -f
# Verify on client
dhclient -v eth0
If problems persist, use tcpdump to analyze traffic:
sudo tcpdump -i eth0 port 67 or port 68 -vv -n
Look for these sequence patterns: DISCOVER → OFFER → REQUEST → ACK. Missing ACKs will be evident.
When analyzing DHCP traffic, we often expect the standard four-step handshake (DISCOVER-OFFER-REQUEST-ACK). However, in this case, we're seeing a breakdown after DHCPOFFER with no subsequent DHCPACK. This manifests as continuous 30-second retransmission cycles from the client.
The absence of DHCPACK typically indicates one of these scenarios:
- Network connectivity issues preventing packet delivery
- DHCP server configuration problems (especially with pool declarations)
- IP address conflicts with existing leases
- Client-side DHCP service malfunction
The provided dhcpd.conf shows several interesting elements:
# Critical configuration elements
authoritative;
ddns-update-style none;
deny duplicates;
# Fixed host declarations
host host2 { hardware ethernet xx:xx:xx:xx:xx:xx; fixed-address x.x.x.202; }
# Testing pool configuration
pool {
max-lease-time 300;
range x.x.x.250 x.x.x.254;
deny known-clients;
}
1. Verify Server Logs:
tail -f /var/log/syslog | grep dhcpd
# Look for errors like "no free leases" or "declined address"
2. Check Lease Status:
dhcp-lease-list
# Or examine lease file directly
cat /var/lib/dhcp/dhcpd.leases
3. Network Capture:
tcpdump -i eth0 port 67 or port 68 -vv
# Filter for specific client MAC
tcpdump -i eth0 ether host xx:xx:xx:xx:xx:xx and port 67 or 68
The existing configuration can be enhanced with these additions:
# Add to global section
log-facility local7;
one-lease-per-client true;
# Enhanced pool configuration
pool {
range x.x.x.200 x.x.x.220;
deny unknown-clients;
allow known-clients;
option domain-name "example.com";
option routers x.x.x.129;
default-lease-time 1800;
}
On Linux clients, these commands help diagnose DHCP issues:
# Release and renew DHCP lease
sudo dhclient -r eth0
sudo dhclient -v eth0
# Check acquired lease
cat /var/lib/dhcp/dhclient.leases
When dealing with fixed addresses via DHCP:
- Ensure the fixed-address falls within a defined pool range
- Verify there are no overlapping ranges in multiple pool declarations
- Consider using host declarations outside pool blocks for static assignments