我遇到了 Ubuntu 机器无法在我的家庭网络上协作的问题。网络结构非常简单。它只是两台 Ubuntu 机器(一台运行 14.04 版 XBMCbuntu,另一台运行 14.04.03 版 Ubunutu Server),通过以太网连接到具有 WiFi 功能的 DD-WRT 路由器,该路由器连接 Windows 笔记本电脑。
我的问题是 Linux 机器不想互相通信。XBMCbuntu(我们将其称为 hostA)可以 ping 通 windows 机器,我可以从 windows 机器通过 SSH 进入 hostA,没有问题。Ubuntu Server(hostB)也可以这样做。但是,hostA 无法 ping/SSH hostB,反之亦然。
HostA 尝试 ping HostB
sebastien@hostA:~$ ping 192.168.1.148
PING 192.168.1.148 (192.168.1.148) 56(84) bytes of data.
From 192.168.1.101 icmp_seq=1 Destination Host Unreachable
From 192.168.1.101 icmp_seq=2 Destination Host Unreachable
From 192.168.1.101 icmp_seq=3 Destination Host Unreachable
^C
--- 192.168.1.148 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4022ms
pipe 3
sebastien@hostA:~$ ping hostB
PING degroofserver (192.168.1.148) 56(84) bytes of data.
From hostA (192.168.1.101) icmp_seq=1 Destination Host Unreachable
From hostA (192.168.1.101) icmp_seq=2 Destination Host Unreachable
From hostA (192.168.1.101) icmp_seq=3 Destination Host Unreachable
^C
--- hostB ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4023ms
pipe 3
HostB 尝试 ping HostA 也得到同样的结果。它们可以解析 IP 地址,但不能解析 MAC 地址:
这是 hostA 的 arp -a
router (192.168.1.1) at 20:4e:7f:8e:00:91 [ether] on eth0
hostB (192.168.1.148) at <incomplete> on eth0
windows1 (192.168.1.110) at e0:b9:a5:fc:3e:e8 [ether] on eth0
并且 hostB 的 arp -a
windows1 (192.168.1.110) at e0:b9:a5:fc:3e:e8 [ether] on p1p1
hostA (192.168.1.101) at <incomplete> on p1p1
router (192.168.1.1) at 20:4e:7f:8e:00:91 [ether] on p1p1
HostA 的 ifconfig eth0
eth0 Link encap:Ethernet HWaddr bc:5f:f4:fb:0a:ce
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::be5f:f4ff:fefb:ace/64 Scope:Link
UP BROADCAST RUNNING 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)
Interrupt:16
HostB 的 inconfig p1p1
p1p1 Link encap:Ethernet HWaddr 8c:89:a5:e6:d9:c5
inet addr:192.168.1.148 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::8e89:a5ff:fee6:d9c5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1956 errors:0 dropped:0 overruns:0 frame:0
TX packets:676 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:486677 (486.6 KB) TX bytes:102329 (102.3 KB)
两台机器都没有 iptables 规则或活动的 ufw。我尝试过重新启动路由器,但这是第 2 层问题,而不是第 3 层问题,所以什么都没有改变。