我将 Ubuntu 16.04 服务器迁移到新数据中心,但网络无法正常工作。我最终将其升级到 18.04,并从 更改为 ,/etc/network/interfaces
但netplan
问题仍然存在。
尝试 ping 网关时,它会出现错误,但随后它会工作几次,然后再次出错。我尝试使用多个 IP 地址以确保它不是 IP 冲突,我还使用了多个 NIC 接口,并将多条线插入交换机的不同端口。
之前我让它工作了,似乎只要 ping 处于活动状态,它就会保持连接,并且它保持足够长的时间以升级到 18.04,但自从重新启动后它仍然有问题。我尝试使用 netplan,但它仍然不起作用
我不知道下一步该做什么,除了格式化和重新安装,我宁愿不这样做,因为花了相当多的时间才正确配置其上的 OpenStreetMap 设置。
➜ ~ ping 28.53.45.1
PING 28.53.45.1 (28.53.45.1) 56(84) bytes of data.
From 28.53.45.5 icmp_seq=1 Destination Host Unreachable
From 28.53.45.5 icmp_seq=2 Destination Host Unreachable
From 28.53.45.5 icmp_seq=3 Destination Host Unreachable
.....
From 28.53.45.5 icmp_seq=29 Destination Host Unreachable
From 28.53.45.5 icmp_seq=30 Destination Host Unreachable
64 bytes from 28.53.45.1: icmp_seq=31 ttl=64 time=900 ms
64 bytes from 28.53.45.1: icmp_seq=32 ttl=64 time=0.532 ms
64 bytes from 28.53.45.1: icmp_seq=33 ttl=64 time=0.306 ms
64 bytes from 28.53.45.1: icmp_seq=34 ttl=64 time=2.09 ms
64 bytes from 28.53.45.1: icmp_seq=35 ttl=64 time=0.728 ms
64 bytes from 28.53.45.1: icmp_seq=36 ttl=64 time=0.243 ms
64 bytes from 28.53.45.1: icmp_seq=37 ttl=64 time=0.313 ms
64 bytes from 28.53.45.1: icmp_seq=38 ttl=64 time=0.350 ms
64 bytes from 28.53.45.1: icmp_seq=39 ttl=64 time=0.345 ms
64 bytes from 28.53.45.1: icmp_seq=40 ttl=64 time=8.61 ms
From 28.53.45.5 icmp_seq=41 Destination Host Unreachable
......
From 28.53.45.5 icmp_seq=46 Destination Host Unreachable
当 arp -a 不工作时的输出:
➜ ~ arp -a
28-53-45-6.c7dc.com (28.53.45.6) at 6c:ae:8b:62:94:3c [ether] on eno1
? (28.53.45.2) at 74:8e:f8:75:aa:00 [ether] on eno1
? (192.168.2.6) at 6c:ae:8b:62:94:3b [ether] on eno2
? (28.53.45.1) at 02:e0:52:51:5a:d2 [ether] on eno1
? (28.53.45.4) at 00:21:9b:99:f1:49 [ether] on eno1
? (28.53.45.3) at 74:8e:f8:75:22:00 [ether] on eno1
然后,下次 ping 几次后又失败了。
➜ ~ arp -a
28-53-45-6.c7dc.com (28.53.45.6) at 6c:ae:8b:62:94:3c [ether] on eno1
28-53-45-2.c7dc.com (28.53.45.2) at 74:8e:f8:75:aa:00 [ether] on eno1
? (192.168.2.6) at 6c:ae:8b:62:94:3b [ether] on eno2
28-53-45-1.c7dc.com (28.53.45.1) at <incomplete> on eno1
28-53-45-4.c7dc.com (28.53.45.4) at 00:21:9b:99:f1:49 [ether] on eno1
28-53-45-3.c7dc.com (28.53.45.3) at 74:8e:f8:75:22:00 [ether] on eno1
➜ ~
网关地址所在的行,也是<incomplete>
ping 成功的地方。28-53-45-6 和 192.168.2.6 是我用来 SSH 的电脑的 IP