![“目标主机不可访问”且 ARP 没有通过 LAN 返回地址](https://linux22.com/image/630519/%E2%80%9C%E7%9B%AE%E6%A0%87%E4%B8%BB%E6%9C%BA%E4%B8%8D%E5%8F%AF%E8%AE%BF%E9%97%AE%E2%80%9D%E4%B8%94%20ARP%20%E6%B2%A1%E6%9C%89%E9%80%9A%E8%BF%87%20LAN%20%E8%BF%94%E5%9B%9E%E5%9C%B0%E5%9D%80.png)
我目前正在尝试在两台机器上设置 LAN,网络掩码为,255.255.255.0
但是当我尝试在它们之间进行通信时收到以下消息;
[root@alpha ~]# ping 192.168.0.249
PING 192.168.0.249 (192.168.0.249) 56(84) bytes of data.
From 192.168.0.248 icmp_seq=2 Destination Host Unreachable
From 192.168.0.248 icmp_seq=3 Destination Host Unreachable
From 192.168.0.248 icmp_seq=4 Destination Host Unreachable
--- 192.168.0.249 ping statistics ---
6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 5175ms
另一台专用机器上的情况也正好相反。我不知道我做错了什么,我多次重启网络服务,但仍然没有成功。
从下面可以看出,ARP 没有返回 LAN 地址,但它应该显示两个。IPTables 已禁用,常规公共 IP 将允许 ping。
Dedi #1 的详细信息:
[root@alpha ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:25:90:C8:81:4C
inet addr:192.168.0.248 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::225:90ff:fec8:814c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3634 errors:0 dropped:0 overruns:0 frame:0
TX packets:197 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:220672 (215.5 KiB) TX bytes:10318 (10.0 KiB)
Memory:f7180000-f7200000
[root@alpha ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
*.*.*.152 0.0.0.0 255.255.255.248 U 0 0 0 eth1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth1
0.0.0.0 *.*.*.153 0.0.0.0 UG 0 0 0 eth1
[root@alpha ~]# arp -a
? (*.*.*.153) at 74:8e:f8:f7:98:58 [ether] on eth1
Dedi #2 的详细信息:
[root@beta network-scripts]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:25:90:C5:C8:A0
inet addr:192.168.0.249 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::225:90ff:fec5:c8a0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:3576 (3.4 KiB)
Memory:f7180000-f7200000
[root@beta network-scripts]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
*.*.*.128 0.0.0.0 255.255.255.248 U 0 0 0 eth1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth1
0.0.0.0 *.*.*.129 0.0.0.0 UG 0 0 0 eth1
[root@beta network-scripts]# arp -a
? (*.*.*.129) at 74:8e:f8:fa:b9:8e [ether] on eth1
答案1
虽然我不能 100% 确定(您必须联系 SecureServers),但大多数托管公司会使用 VLAN 或 ACL 条目隔离位于同一交换机上的服务器。这样,您的服务器就无法互相看到。
请与您的托管公司联系以确保无误。他们很可能必须为您设置专用的“内部”网络,或者您需要使用 VPN 解决方案。