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 - 192.168.0.202
target gateway - 192.168.0.200
target netmask - 255.255.255.0
2> Desktop ip - 192.168.0.204
Desktop gateway - 192.168.0.200
Desktop netmask - 255.255.255.0
3> ssh pi@192.168.0.202 ----- ping 192.168.0.202 ----->> 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 192.168.0.240 netmask 255.255.255.0
5> Ping to target from my laptop gives following error :--
ignite@ubuntu:~$ ping 192.168.0.202
PING 192.168.0.202 (192.168.0.202) 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:192.168.0.240 Bcast:192.168.0.255 Mask:255.255.255.0
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)
Interrupt:41
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
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)