Fixes

Fix

Ping says Destination Host Unreachable on the local network

Your own machine sent ARP requests for that address and nobody answered: the host is off, has another address, or has ARP switched off.

Likely causes

  1. The host is down, or has another address than the one you use.
  2. ARP is off on the host's card (NOARP), or your machine has a wrong static ARP entry.
  3. If ARP answers but ping does not, the host is up and only ICMP is blocked.

Diagnose

Run these in order. The output is what each printed on a lab's real Linux machines.

alice:~# ping -c3 10.0.1.99
The error comes From 10.0.1.10, your own address: no router was involved.
PING 10.0.1.99 (10.0.1.99) 56(84) bytes of data.
From 10.0.1.10 icmp_seq=1 Destination Host Unreachable
From 10.0.1.10 icmp_seq=2 Destination Host Unreachable
From 10.0.1.10 icmp_seq=3 Destination Host Unreachable

--- 10.0.1.99 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2078ms
pipe 3
alice:~# ip neigh show 10.0.1.99
The neighbour table says FAILED: ARP asked and got no answer.
10.0.1.99 dev eth0 FAILED 
alice:~# ping -c2 -W1 10.0.1.11
A host that is up but drops ping: plain packet loss, no Unreachable.
PING 10.0.1.11 (10.0.1.11) 56(84) bytes of data.

--- 10.0.1.11 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1027ms
alice:~# arping -c2 -I eth0 10.0.1.11
arping asks by ARP, below any IP firewall: replies mean the host is there.
ARPING 10.0.1.11 from 10.0.1.10 eth0
Unicast reply from 10.0.1.11 [EE:F1:47:E7:5A:F0]  0.526ms
Unicast reply from 10.0.1.11 [EE:F1:47:E7:5A:F0]  0.558ms
Sent 2 probes (1 broadcast(s))
Received 2 response(s)
alice:~# arping -D -c2 -w3 -I eth0 10.0.1.11
Before using an address, arping -D checks nobody has it: a reply means it is taken (a duplicate).
ARPING 10.0.1.11 from 0.0.0.0 eth0
Unicast reply from 10.0.1.11 [EE:F1:47:E7:5A:F0]  0.621ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)
alice:~# arping -D -c2 -w3 -I eth0 10.0.1.50
No reply: the address is free.
ARPING 10.0.1.50 from 0.0.0.0 eth0
Sent 2 probes (2 broadcast(s))
Received 0 response(s)

Fix

ip link set eth0 arp on
On a host whose card shows NOARP: switch ARP back on.

The fix the lab's challenge "Bob vanished from the network" checks.

ip neigh del 10.0.1.2 dev eth0
On a machine with a wrong PERMANENT neighbour entry: delete it, and ARP asks afresh.

The fix the lab's challenge "Alice is stuck in the office" checks.

Break it and fix it yourself

Each lab is a small network of real Linux machines in your browser, where this fault happens.

Open ARP and MAC addresses: who is behind this IP address?

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Start with a free account: Google or email, no card.

Start this lab, free