我有一台带有两个网卡的服务器,它运行的是 Ubuntu Server 14.04。第一个是接口“p3p1”,它连接到 IP 192.168.1.100 的子网 192.168.1.0/24。第二个是接口“em1”,它连接到 IP 192.168.100.1 的子网 192.168.100.0/24。
我的服务器可以ping通子网192.168.1.0/24的所有主机,但是无法ping通192.168.100.0/24的主机。
当我尝试 ping 到子网 192.168.100.0/24 上的主机 (192.168.100.20) 时,我可以看到服务器的 ARP 请求以及主机将其 MAC 地址告诉服务器的 ARP 响应。但是当我尝试查看服务器的 arp 表时,它告诉我:
"? (192.168.100.20) at <incomplete> on em1"
当我尝试使用主机 (192.168.1.20) ping 服务器 (192.168.100.1) 时,我可以看到主机的 ARP 请求,但没有得到服务器的响应。
如果我在服务器 ARP 表中手动添加主机的 MAC 地址,则可以 ping 通。
我认为 ARP 服务不适用于“em1”接口,但我不知道如何修复。
这是我的配置:
ARP表
thegorlie@serv-io ~> arp -a
? (192.168.100.20) at <incomplete> on em1
? (192.168.1.1) at e0:ce:c3:f5:be:56 [ether] on p3p1
? (192.168.1.14) at 08:3e:8e:dd:05:e7 [ether] on p3p1
如果配置
em1 Link encap:Ethernet HWaddr 74:d4:35:e7:62:16
inet addr:192.168.100.1 Bcast:192.168.100.255 Mask:255.255.255.0
inet6 addr: xxxx::xxxx:35ff:fee7:6216/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:5422 (5.4 KB)
Interrupt:20 Memory:f7e00000-f7e20000
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:65536 Metric:1
RX packets:909 errors:0 dropped:0 overruns:0 frame:0
TX packets:909 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:91970 (91.9 KB) TX bytes:91970 (91.9 KB)
p3p1 Link encap:Ethernet HWaddr 74:d4:35:e7:62:14
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: xxxx:xxxx:xxxx:3a80:76d4:35ff:fee7:6214/64 Scope:Global
inet6 addr: xxxx::xxxx:xxxx:fee7:6214/64 Scope:Link
inet6 addr: xxxx:xxxx:xxxx:3a80:2d32:f878:e435:69ec/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:27756 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:19
ARP手动请求
thegorlie@serv-io ~> arping -c 1 -I em1 192.168.100.20
ARPING 192.168.100.20 from 192.168.100.1 em1
Sent 1 probes (1 broadcast(s))
Received 0 response(s)
当服务器 ping 主机时,Wireshark 在主机上捕获
Giga-Byt_e7:62:16 Broadcast ARP 60 Who has 192.168.100.20? Tell 192.168.100.1
Sony_c8:7a:a3 Giga-Byt_e7:62:16 ARP 42 192.168.100.20 is at 30:f9:ed:c8:7a:a3
Giga-Byt_e7:62:16 Broadcast ARP 60 Who has 192.168.100.20? Tell 192.168.100.1
Sony_c8:7a:a3 Giga-Byt_e7:62:16 ARP 42 192.168.100.20 is at 30:f9:ed:c8:7a:a3
Giga-Byt_e7:62:16 Broadcast ARP 60 Who has 192.168.100.20? Tell 192.168.100.1
Sony_c8:7a:a3 Giga-Byt_e7:62:16 ARP 42 192.168.100.20 is at 30:f9:ed:c8:7a:a3
当主机 ping 服务器时,Wireshark 在主机上捕获
Sony_c8:7a:a3 Broadcast ARP 42 Who has 192.168.100.1? Tell 192.168.100.20
Sony_c8:7a:a3 Broadcast ARP 42 Who has 192.168.100.1? Tell 192.168.100.20
Sony_c8:7a:a3 Broadcast ARP 42 Who has 192.168.100.1? Tell 192.168.100.20
Sony_c8:7a:a3 Broadcast ARP 42 Who has 192.168.100.1? Tell 192.168.100.20
Sony_c8:7a:a3 Broadcast ARP 42 Who has 192.168.100.1? Tell 192.168.100.20
答案1
我发现了问题。
问题是驱动程序有一些错误。我下载的我的主板 (GA-Z97N-WIFI) 中嵌入的以太网卡 (英特尔® 以太网连接 I217-V) 的最新版本驱动程序并已安装。它工作没有问题。