Super User is a question and answer site for computer enthusiasts and power users. 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

Now where is the problem if ssh & ping to target works from desktop but not from laptop ?

I have been able to ssh to my target from my DESKTOP using following command :--- Target IP is fixed in /etc/network/interfaces

1> target ip -
   target gateway -
   target netmask -

2> Desktop ip -
   Desktop gateway -
   Desktop netmask -

3> ssh pi@ ----- ping ----->> works fine from desktop

4> Now i am trying the same with my laptop. My laptop also have wi-fi. I have disabled wi-fi function on my laptop. And connected my target to the laptop directly. I set IP address of laptop using.

sudo ifconfig eth0 netmask

5> Ping to target from my laptop gives following error :--

ignite@ubuntu:~$ ping
PING ( 56(84) bytes of data.
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable

6> if i ifconfig on my laptop :--

ignite@ubuntu:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:90:f5:a9:89:6a  
          inet addr:  Bcast:  Mask:
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:46 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1132 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2760 (2.7 KB)  TX bytes:261875 (261.8 KB)

lo        Link encap:Local Loopback  
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:5946 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5946 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:571442 (571.4 KB)  TX bytes:571442 (571.4 KB)
share|improve this question

migrated from Jan 23 '13 at 14:21

This question came from our site for professional and enthusiast programmers.

You need to add gateway to your ifconfig configuration:

route add default gw

Make sure your interface is up:

ifconfig eth0 up

I believe this should help.

share|improve this answer
No gateway needed to access the local LAN, and the interface does appear to be up. – Matthew Lundberg Jan 23 '13 at 14:27
i have tried both adding a gateway & up onto the eth0. But both are not working. Could be firewall problem ? .... Any suggestion on this ? – Allan Jan 24 '13 at 5:43

Before setting up the ip of eth0 you must make sure that the interface is down, that is

sudo eth0 down

Then set the ip address

sudo ifconfig eth0

No need to set the Netmask address :) After this enable the interface

sudo eth0 up

Now verify once using ifconfig

This should have solved your problem :)

please do revert back if you still face any problem

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .