Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It's Debian 6.0 setup, I used to have the ip manually set to but now I have a new server with that IP I want to just copy some stuff over through the network but now I can't seem to get it to play nicely on the network, all over network access is fine but always reroutes to itself.

I've set up my config as so in /etc/network/interfaces

auto lo eth0
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp

performing a ping produces:

PING ( 56(84) bytes of data.
From icmp_seq=1 Destination Host Unreachable
From icmp_seq=2 Destination Host Unreachable
From icmp_seq=3 Destination Host Unreachable
From icmp_seq=4 Destination Host Unreachable
From icmp_seq=5 Destination Host Unreachable
From icmp_seq=6 Destination Host Unreachable

Do I need to clear a cache somewhere which is causing the forwarding? What other things can I do to diagnose the problem?

share|improve this question
not sure but check the command: route If you need you can reset yours. – vfbsilva Sep 2 '13 at 18:12
up vote 1 down vote accepted

Since your system appears to have gotten an IP address successfully from the DHCP server (, this would appear to be a routing issue. As @ash has suggested try the command:

$ netstat -rn

This command is synonymous with the other suggestion route -n. Either command will produce output similar to this:


$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   U     2      0        0 wlan0         UG    0      0        0 wlan0


$ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface   U         0 0          0 wlan0         UG        0 0          0 wlan0

The line that's the interesting one is the line that has the UG in its Flags column. This is your systems default gateway. This is the default destination for any IP packets that don't have an explicit match to any network definitions (the 1st column).

In your case you're probably going to have lines similar to mine above, except the IPs will be different. Your network address will be

If this all looks OK then make sure that you can ping your default route first. Sometimes systems have firewall configured such that they won't respond to ping packets (ICMP packets).

The other thing to try would be a traceroute:

$ traceroute
traceroute to (, 30 hops max, 60 byte packets
 1  router1.bubba.net (  1.399 ms  1.586 ms  1.904 ms

This will show you the path a packet would take to get from you to a destination.

share|improve this answer
@Sly - what was the eventual issue? – slm Sep 2 '13 at 21:40

There is nothing in that output that shows any type of forwarding. What that output shows is that the server does not know how to reach the IP address

To diagnose the "Destination Host Unreachable" error, check the network routing:

netstat -rn

Take off the -n if you want network IP address to translate back to server names.

Look for an entry that has a mask and destination such that, when has the mask applied (bitwise anded), the destination value is matched. For example:

Destination   Mask

This would match since masked with gives

share|improve this answer
Sorry to be clear, the Server i'm using used to have a fixed IP address of but now has a DHCP assigned address of and can ping all over network addresses except – Peter Fox Sep 2 '13 at 21:31
Even so, the routing table holds the key to your problem, if I'm reading this right. The host is not reachable comes from routing. There could be an interaction with something else on the network (such as a router) that leads to that error as well, but that seems unlikely based on the description given. – ash Sep 2 '13 at 21:35
Posting the routing table (output of netstat -rn) will help us to answer. – ash Sep 2 '13 at 21:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.