Linux上的间歇性“无路由到主机”错误

我在同一个networking上有两台电脑:
10.0.0.4
10.0.0.5

如果我闲着大约10分钟左右,当我试图连接它们时,我得到:

$ ssh [email protected] $ ssh: connect to host 10.0.0.4 port 22: No route to host 

但是,如果我立即重试,它的工作。 再等待10分钟,我得到错误。 这也发生在ping ,所以我不认为它与ssh有关。

有任何想法吗?

其他信息:两台机器都是Ubuntu

 **10.0.0.4:** $ ifconfig ath0 Link encap:Ethernet HWaddr 00:1f:e2:86:65:60 inet addr:10.0.0.4 Bcast:10.0.0.255 Mask:255.255.255.0 inet6 addr: fe80::21f:e2ff:fe86:6560/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3778 errors:0 dropped:0 overruns:0 frame:0 TX packets:1531 errors:1 dropped:1 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:516476 (516.4 KB) TX bytes:209053 (209.0 KB) $ netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ath0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 ath0 0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 ath0 $ arp -n Address HWtype HWaddress Flags Mask Iface 10.0.0.1 ether 00:11:50:1e:61:02 C ath0 10.0.0.5 ether 00:26:5e:11:97:13 C ath0 **10.0.0.5:** $ ifconfig eth1 Link encap:Ethernet HWaddr 00:26:5e:11:97:13 inet addr:10.0.0.5 Bcast:10.0.0.255 Mask:255.255.255.0 inet6 addr: fe80::226:5eff:fe11:9713/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:9388 errors:0 dropped:0 overruns:0 frame:24978 TX packets:10300 errors:6 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:4785464 (4.7 MB) TX bytes:1978774 (1.9 MB) Interrupt:17 $ netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1 0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 eth1 $ arp -n Address HWtype HWaddress Flags Mask Iface 10.0.0.1 ether 00:11:50:1e:61:02 C eth1 

在这一点上,知道两台计算机都有无线网卡,那么我不排除干扰。 但是,由于只有一个主机出现帧错误,我想指出我的手指在那个特定的主机上。

build议

  1. 确保主机附近没有任何东西(特别是10.0.0.5)可能会造成干扰。 可能性:电源线,微波炉,其他广播源(无绳电话等)

  2. 确保10.0.0.5正在使用正确的无线驱动程序。

  3. 借用10.0.0.5的无线网卡来确定您当前的网卡是否是fubar

尝试使用tcpdump或wireshark等networking嗅探器来追踪问题。

你也可以尝试从10.0.0.4到10.0.0.5的ssh。