我已经尝试了与该问题相关的所有答案,但似乎没有什么能解决我的问题。
当尝试更新 apt 或任何软件包时,它仍然停留在:
root@nfs:~# apt-get update 0% [Connecting to us.archive.ubuntu.com
(91.189.91.23)] [Connecting to security.ubuntu.com (91.189.91.26)]
我的网络接口:
root@nfs:~# ifconfig
enp0s3 Link encap:Ethernet HWaddr
08:00:27:06:48:a0
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe06:48a0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:167 errors:0 dropped:0 overruns:0 frame:0
TX packets:700 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:18735 (18.7 KB) TX bytes:53591 (53.5 KB)
enp0s8 Link encap:Ethernet HWaddr 08:00:27:92:98:6c
inet addr:192.168.56.102 Bcast:192.168.56.255 sk:255.255.255.0
inet6 addr: fe80::a00:27ff:fe92:986c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:665 errors:0 dropped:0 overruns:0 frame:0
TX packets:474 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:101036 (101.0 KB) TX bytes:62517 (62.5 KB)
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:164 errors:0 dropped:0 overruns:0 frame:0
TX packets:164 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:12176 (12.1 KB) TX bytes:12176 (12.1 KB)
我的 /etc/network/interfaces:
root@nfs:~# cat /etc/network/interfaces
...
auto lo iface lo inet loopback
# The primary network interface auto enp0s3 iface enp0s3 inet dhcp
auto enp0s8 iface enp0s8 inet dhcp
它一直运行良好,直到几天前突然停止工作。没有进行任何修改。
我可以 ping 互联网上的任何主机,甚至是 google 或 us.archive.ubuntu.com:
root@nfs:~# ping us.archive.ubuntu.com
PING us.archive.ubuntu.com (91.189.91.23) 56(84) bytes of data.
64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=1 ttl=47 time=159 ms
64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=2 ttl=47 time=154 ms ^C
--- us.archive.ubuntu.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 154.070/157.008/159.947/2.965 ms
root@nfs:~# ping www.google.com
PING www.google.com (172.217.21.68) 56(84) bytes of data.
64 bytes from fra07s31-in-f68.1e100.net (172.217.21.68): icmp_seq=1 ttl=49 time=63.7 ms ^C
--- www.google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 63.741/63.741/63.741/0.000 ms
我在这里和其他地方看到的大多数答案都建议禁用 IPv6 配置,我照做了但仍然没有任何效果,但似乎我的配置使用的是 IPv4 定义。
我在 3 个不同的虚拟机(在 virtualbox 中)上遇到了同样的问题,以前它们都运行正常。重新安装其中一个后,问题仍然存在。
我在 ubuntu 服务器 16.04.3 LTS 上,通过我的主机连接、网络接口 enp0s3 连接到互联网
请问有什么想法吗?
提前致谢。Vlad