When You “Have an IP” but the Network Still Doesn’t Work: A DHCP/IP-Conflict Fix
Background
I hit a weird situation recently: the machine had an IP address, my apt proxy settings were correct, and I could even ping an internal desktop — but anything beyond that was unreliable or completely dead.
The giveaway was that ping started showing duplicate replies for the same target IP. That usually indicates an IP address conflict: two hosts are using the same IP, so both respond to ARP and ICMP.
In my case, the fastest fix was to force a DHCP renew and grab a fresh IP lease.
Symptoms (What I Saw)
- IP address looked “valid” (interface up, IP assigned)
- Proxy config for
apt.conflooked correct - Some internal hosts were reachable, but the network felt “broken”
- Ping returned duplicate responses (a big red flag)
If you see duplicate ping replies, it’s very likely that the IP you’re using is already taken by another machine (static assignment or stale DHCP behavior).
Fix: Release and Renew DHCP Lease
1) Release your current DHCP lease
sudo dhclient -r
Or specify the interface explicitly:
sudo dhclient -r eth0
-r = release (tell the DHCP server you’re giving up the lease)
2) Request a fresh IP lease
sudo dhclient
Or specify the interface:
sudo dhclient eth0
3) Verbose mode (useful for debugging)
To see what DHCP is doing (release):
sudo dhclient -v -r eth0
To see the full DHCP negotiation (renew):
sudo dhclient -v eth0
-v = verbose (prints DHCP discovery/offer/request/ack details)
Other Helpful Options
Bring the interface down/up
sudo ifdown eth0
sudo ifup eth0
Restart networking service (Debian/Ubuntu-style)
sudo /etc/init.d/networking restart
Notes
- If you’re using NetworkManager,
ifdown/ifupmay not behave as expected. In that case, prefernmclior restart NetworkManager. - If the issue keeps happening, someone may be statically assigning an address inside your DHCP pool (bad practice), or the DHCP pool might be misconfigured.
Quick rule: duplicate ping replies → suspect IP conflict → force DHCP renew.