routing - ssh connection sometimes prints "No route to host", other times it connects normally -
i have 2 laptops : - first debian squeeze , connected via ethernet , has ip address 192.168.0.2 - second ubuntu 12.10 connected via wlan , has ip address 192.168.0.9
the problem is: - if try use ssh first second result :
laptop1@192.168.0.2:~$ ssh laptop2@192.168.0.9 "ssh : connect host 192.168.0.9 port 22: no route host " if try use ssh second first , connects first.
laptop2@192.168.0.9:~$ ssh laptop1@192.168.0.1and if try again connect first second , connects second
laptop1@192.168.0.2:~$ ssh laptop2@192.168.0.9
but after few minutes if try use ssh first second , still result :
"ssh : connect host 192.168.0.9 port 22: no route host ". typing command arp on laptop1 noticed cannot connect laptop1 laptop2 when disappears ip address of laptop2.
laptop1@192.168.0.2:~$ sudo arp address hwtype hwaddress flags mask iface 192.168.0.1 ether 00:1b:2f:3f:b5:a2 c eth0 192.168.0.9 ether e4:d5:3d:03:3b:ed c eth0 after few minutes...
laptop1@192.168.0.2:~$ sudo arp address hwtype hwaddress flags mask iface 192.168.0.1 ether 00:1b:2f:3f:b5:a2 c eth0 someone understands why happens? , how can fix it?
i post more information of 2 laptops:
for laptop1:
laptop1@192.168.0.2:~$ sudo ifconfig eth0 link encap:ethernet hwaddr 20:cf:30:08:e0:82 inet addr:192.168.0.2 bcast:192.168.0.255 mask:255.255.255.0 inet6 addr: fe80::22cf:30ff:fe08:e082/64 scope:link broadcast running multicast mtu:1500 metric:1 rx packets:29290 errors:0 dropped:0 overruns:0 frame:0 tx packets:28325 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 rx bytes:20301572 (19.3 mib) tx bytes:11035023 (10.5 mib) interrupt:30 lo link encap:local loopback inet addr:127.0.0.1 mask:255.0.0.0 inet6 addr: ::1/128 scope:host loopback running mtu:16436 metric:1 rx packets:1440 errors:0 dropped:0 overruns:0 frame:0 tx packets:1440 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 rx bytes:166450 (162.5 kib) tx bytes:166450 (162.5 kib) wlan0 link encap:ethernet hwaddr 74:f0:6d:76:79:93 inet6 addr: fe80::76f0:6dff:fe76:7993/64 scope:link broadcast multicast mtu:1500 metric:1 rx packets:42 errors:0 dropped:0 overruns:0 frame:0 tx packets:81 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 rx bytes:10888 (10.6 kib) tx bytes:16236 (15.8 kib) laptop1@192.168.0.2:~$ sudo route -n kernel ip routing table destination gateway genmask flags metric ref use iface 192.168.0.0 0.0.0.0 255.255.255.0 u 1 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 u 1000 0 0 eth0 0.0.0.0 192.168.0.1 0.0.0.0 ug 0 0 0 eth0for laptop2:
laptop2@192.168.0.9:~$ sudo ifconfig eth0 link encap:ethernet hwaddr 04:7d:7b:1e:47:8b broadcast multicast mtu:1500 metric:1 rx packets:0 errors:0 dropped:0 overruns:0 frame:0 tx packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 rx bytes:0 (0.0 b) tx bytes:0 (0.0 b) lo link encap:local loopback inet addr:127.0.0.1 mask:255.0.0.0 inet6 addr: ::1/128 scope:host loopback running mtu:16436 metric:1 rx packets:124 errors:0 dropped:0 overruns:0 frame:0 tx packets:124 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 rx bytes:10373 (10.3 kb) tx bytes:10373 (10.3 kb) wlan0 link encap:ethernet hwaddr e4:d5:3d:03:3b:ed inet addr:192.168.0.9 bcast:192.168.0.255 mask:255.255.255.0 inet6 addr: fe80::e6d5:3dff:fe03:3bed/64 scope:link broadcast running multicast mtu:1500 metric:1 rx packets:1434 errors:0 dropped:0 overruns:0 frame:0 tx packets:1329 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 rx bytes:1274245 (1.2 mb) tx bytes:188474 (188.4 kb) laptop2@192.168.0.9:~$ sudo route -n kernel ip routing table destination gateway genmask flags metric ref use iface 0.0.0.0 192.168.0.1 0.0.0.0 ug 0 0 0 wlan0 169.254.0.0 0.0.0.0 255.255.0.0 u 1000 0 0 wlan0 192.168.0.0 0.0.0.0 255.255.255.0 u 9 0 0 wlan0
Comments
Post a Comment