Destination Host Unreachable

Fix 'Destination Host Unreachable' on Linux: Ping Fails

Ping says 'Destination Host Unreachable' when no route to the target exists. Check your interface, gateway, and ARP table first.

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)

  1. Check your interfaces.
    ip link show
    Look for your NIC, like eth0 or enp3s0. You want to see state UP and LOWER_UP. If you see DOWN or NO-CARRIER, that's your problem. Bring it up:
    sudo ip link set eth0 up
    If it stays NO-CARRIER, plug the cable in or check the switch. No amount of config will fix a dead physical link.
  2. Look at your routes.
    ip route show
    You should see a default route like default via 192.168.1.1 dev eth0. If it's missing, add it. Replace the IP with your real gateway.
    sudo ip route add default via 192.168.1.1 dev eth0
    If you're pinging a specific subnet and there's no route for it, either add a static route or just use the default.
  3. Check the ARP table.
    ip neigh show
    Look for the entry for your gateway. It should say REACHABLE or STALE. If it says FAILED or INCOMPLETE, that's why you can't reach anything. Flush it and let it re-resolve:
    sudo ip neigh flush all
    Then ping again — this forces a fresh ARP request. If it still fails, your gateway IP might be wrong.
  4. Check your IP address.
    ip addr show eth0
    If your IP is 0.0.0.0 or missing, you've got no address. Get one via DHCP:
    sudo dhclient eth0
    Or set it statically, but that varies by distro. On Debian/Ubuntu, edit /etc/netplan/*.yaml or /etc/network/interfaces. On RHEL/Fedora, use nmcli.

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:
    sudo systemctl restart NetworkManager
    Or for netplan:
    sudo 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 -L if you have arptables. Otherwise, temporarily stop the firewall to test:
    sudo ufw disable
    (Re-enable after testing!)
  • 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.

Related Errors in Linux & Unix
Your Linux Disk Went Read-Only? Here's the Real Fix eval() error Fix Google Search eval() redirect error on Linux addEventListener and attachEvent are unavailable Browser addEventListener/attachEvent not available fix Start request repeated too quickly systemd Service Restart Limit Reached: 3 Fixes That Work

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.