Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

System A has Wi-Fi Internet access and an Ethernet port, while System B has just an Ethernet port. I connected the ports directly to each other. Both are fairly modern desktop PCs running Ubuntu 10.04.

On A I ran:

$ sudo ip addr add dev eth0

$ ip route dev ra0  proto kernel  scope link  src  metric 2 dev eth0  proto kernel  scope link  src dev ra0  scope link  metric 1000 
default via dev ra0  proto static

On B I ran:

$ sudo ip addr add dev eth0

However, when I now try to ping from .1, I get:

$ ping
PING ( 56(84) bytes of data.
From icmp_seq=1 Destination Port Unreachable
From icmp_seq=2 Destination Port Unreachable

Any hints? TIA.

share|improve this question
Please add the output of tail /var/log/ufw.log to rule out any inadvertent firewall behaviour (unlikely) and also the output from each box of ifconfig -a to inspect packet statistics. Finally, did you use a crossover cable, or are you relying on one of the NICs having crossover detection? Or when you said you connected them together, did you imply a hub/switch? In that case, what kind? – Scaine Aug 15 '12 at 22:32
up vote 1 down vote accepted

Try using an Ethernet hub or switch to connect the two machines. If the machines are old then you can't use a conventional UTP cable to connect them. (You can use a crossover cable.) Even if the machines are new and are equipped with Auto-MDIX, what can happen is that both machines have their Ethernet ports switched off and niether one will switch its port on until connected to a peer with an enabled port.

share|improve this answer

And like magic, I just pressed up enter to retry the same command again some 10m later, and it works. I'll still mark another answer as accepted if someone can explain why this happened.

Update: Just tried doing the same thing again, and once more I'm getting Destination Host Unreachable errors, except this time it's been hours and the problem hasn't gone away.

share|improve this answer
Any other Wi-Fi routers near you? – Mitch Aug 14 '12 at 7:16
The packets to .2 are being sent to eth0, so Wi-Fi routers should be unrelated. – Yang Aug 14 '12 at 9:01

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.