Quick answer: Run ip route show and ip neigh show to see if you have a route to the target and if the ARP entry is failing. Then check your interface with ip link show — odds are it's down or missing a gateway.
You're staring at a terminal and ping says Destination Host Unreachable. That's different from Network is unreachable, and knowing the difference saves you time. Network unreachable means your machine has no idea how to get to that subnet — no route. Host unreachable means you have a route but can't talk to the next hop — usually an ARP failure. I've had clients panic over this when their server just lost its default gateway after a reboot, and I've also seen a switch port die and cause the same message. Both look identical from your screen.
Why this happens
When you ping something, your kernel looks up the routing table. If it finds a route, it sends an ARP request to the gateway or the target itself (if it's on the same subnet). If that ARP goes unanswered, you get Destination Host Unreachable. That's it. No ARP response = no MAC address = can't build the frame. The cause is almost always one of these:
- The interface is down or has no carrier (cable unplugged, switch port disabled).
- You've got a wrong static route pointing to an unreachable gateway.
- ARP table has a stale entry — the neighbor moved and isn't responding.
- Firewall on the target or the gateway is dropping ARP (rare but happens with aggressive firewall scripts).
I remember a client last month — their Ubuntu 22.04 server suddenly stopped reaching the internet. Turns out the default route was gone because NetworkManager got confused after a suspend. The fix was one command.
Fix steps (in order)
- Check your interfaces.
Look for your NIC, likeip link showeth0orenp3s0. You want to seestate UPandLOWER_UP. If you seeDOWNorNO-CARRIER, that's your problem. Bring it up:
If it stayssudo ip link set eth0 upNO-CARRIER, plug the cable in or check the switch. No amount of config will fix a dead physical link. - Look at your routes.
You should see a default route likeip route showdefault via 192.168.1.1 dev eth0. If it's missing, add it. Replace the IP with your real gateway.
If you're pinging a specific subnet and there's no route for it, either add a static route or just use the default.sudo ip route add default via 192.168.1.1 dev eth0 - Check the ARP table.
Look for the entry for your gateway. It should sayip neigh showREACHABLEorSTALE. If it saysFAILEDorINCOMPLETE, that's why you can't reach anything. Flush it and let it re-resolve:
Then ping again — this forces a fresh ARP request. If it still fails, your gateway IP might be wrong.sudo ip neigh flush all - Check your IP address.
If your IP is 0.0.0.0 or missing, you've got no address. Get one via DHCP:ip addr show eth0
Or set it statically, but that varies by distro. On Debian/Ubuntu, editsudo dhclient eth0/etc/netplan/*.yamlor/etc/network/interfaces. On RHEL/Fedora, usenmcli.
Alternative fixes if the main ones fail
Still stuck? Here's what else to poke:
- Restart networking. Sometimes the stack gets into a weird state. On systemd systems:
Or for netplan:sudo systemctl restart NetworkManagersudo netplan apply - Check for firewall rules that block ARP. This is rare, but if you're running custom iptables rules, look for anything targeting
arp.sudo arptables -Lif you have arptables. Otherwise, temporarily stop the firewall to test:
(Re-enable after testing!)sudo ufw disable - Ping the gateway's IP directly. If that gives the same error, your gateway is wrong or down. If it works, the issue is with routing to the specific target subnet — trace it with
traceroute -n. - Check for duplicate IPs. Run
arping -D -I eth0 192.168.1.10(replace with your IP) to see if another device responds. A duplicate IP will cause chaos.
Prevention tip
Most of this pain comes from missing routes or interfaces that don't come up at boot. If you're using static config, verify it's correct in your netplan or /etc/network/interfaces. For servers, I always add a systemd service that checks connectivity and restart networking if it fails — a poor man's watchdog. But the simplest thing? Test your gateway after every reboot. One ping to the router tells you everything.
And if you're relying on NetworkManager, don't let it manage your server's critical interfaces — I've seen it randomly drop configs. Use netplan or similar, and set optional: true off for important NICs.
Remember, Destination Host Unreachable is almost always local — your box can't get to the next hop. Fix the ARP, fix the route, fix the link. Done.