从今天起,我无法通过浏览器或在终端中 ping 来访问某些网站,而其他网站仍然可以访问。我使用的是 ubuntu 20.04,我没有进行任何网络设置更改或任何其他操作。例如www.google.com或者www.youtube.com可以访问,但www.github.com或者www.askubuntu.com不是。
如你所见,YouTube.com 可以正常 ping,但 GitHub 会抛出
ping : connect : Network is unreachable
我还添加了 systemd.conf 的内容:
If that helps :
the systemd.conf content
` GNU nano 4.8 /etc/systemd/resolved.conf
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See resolved.conf(5) for details
[Resolve]
#DNS=
#FallbackDNS=
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#DNSOverTLS=no
#Cache=no-negative
#DNSStubListener=yes
#ReadEtcHosts=yes`
如果我跑步我会得到什么sudo apt-get update
Err:1 http://de.archive.ubuntu.com/ubuntu focal InRelease
Could not resolve 'de.archive.ubuntu.com'
Hit:2 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu focal InRelease
Hit:3 http://security.ubuntu.com/ubuntu focal-security InRelease
Err:4 http://de.archive.ubuntu.com/ubuntu focal-updates InRelease
Could not resolve 'de.archive.ubuntu.com'
Hit:5 http://ppa.launchpad.net/team-xbmc/ppa/ubuntu focal InRelease
Err:6 http://de.archive.ubuntu.com/ubuntu focal-backports InRelease
Could not resolve 'de.archive.ubuntu.com'
Hit:7 http://ppa.launchpad.net/thierry-f/fork-michael-gruz/ubuntu focal InRelease
Reading package lists... Done
W: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/focal/InRelease Could not resolve 'de.archive.ubuntu.com'
W: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease Could not resolve 'de.archive.ubuntu.com'
W: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease Could not resolve 'de.archive.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
我已经看到,对于一些类似的问题,tracepath 的输出可能相关,因此我也在这里添加():
tracepath google.com
1?: [LOCALHOST] 0.030ms pmtu 1500
1: 2a02:8071:aeb:8200:7254:25ff:fe58:f20b 7.085ms
1: 2a02:8071:aeb:8200:7254:25ff:fe58:f20b 6.447ms
2: 2a02:8071:a00::1 24.160ms
3: 2a02:8071:ff:37c0::1 20.167ms
4: de-str01c-rc1-lo0-0.v6.aorta.net 20.573ms asymm 5
5: de-fra04d-rc1-lo0-0.v6.aorta.net 19.275ms
6: no reply
7: no reply
8: no reply
9: no reply
10: no reply
tracepath github.com
1: send failed
Resume: pmtu 65535
tracepath ebay.com
1: send failed
Resume: pmtu 65535
tracepath youtube.com
1?: [LOCALHOST] 0.015ms pmtu 1500
1: 2a02:8071:aeb:8200:7254:25ff:fe58:f20b 13.594ms
1: 2a02:8071:aeb:8200:7254:25ff:fe58:f20b 9.654ms
2: 2a02:8071:a00::1 412.341ms
3: 2a02:8071:ff:37c0::1 17.899ms
4: de-str01c-rc1-lo0-0.v6.aorta.net 21.356ms asymm 5
5: de-fra01b-rc2-lo0-0.v6.aorta.net 24.844ms
6: no reply
7: no reply
8: no reply
ping ebay.com
ping: connect: Network is unreachable
ping github.com
ping: connect: Network is unreachable
ping youtube.com
PING youtube.com(fra07s30-in-x200e.1e100.net (2a00:1450:4001:803::200e)) 56 data bytes
64 bytes from fra24s02-in-x0e.1e100.net (2a00:1450:4001:803::200e): icmp_seq=1 ttl=115 time=41.1 ms
64 bytes from fra24s02-in-x0e.1e100.net (2a00:1450:4001:803::200e): icmp_seq=2 ttl=115 time=57.1 ms
64 bytes from fra24s02-in-x0e.1e100.net (2a00:1450:4001:803::200e): icmp_seq=3 ttl=115 time=26.9 ms
64 bytes from fra24s02-in-x0e.1e100.net (2a00:1450:4001:803::200e): icmp_seq=4 ttl=115 time=22.2 ms
64 bytes from fra24s02-in-x0e.1e100.net (2a00:1450:4001:803::200e): icmp_seq=5 ttl=115 time=24.7 ms
64 bytes from fra24s02-in-x0e.1e100.net (2a00:1450:4001:803::200e): icmp_seq=6 ttl=115 time=31.0 ms
64 bytes from fra24s02-in-x0e.1e100.net (2a00:1450:4001:803::200e): icmp_seq=7 ttl=115 time=28.9 ms
64 bytes from fra24s02-in-x0e.1e100.net (2a00:1450:4001:803::200e): icmp_seq=8 ttl=115 time=25.7 ms
64 bytes from fra24s02-in-x0e.1e100.net (2a00:1450:4001:803::200e): icmp_seq=9 ttl=115 time=24.4 ms
64 bytes from fra24s02-in-x0e.1e100.net (2a00:1450:4001:803::200e): icmp_seq=10 ttl=115 time=74.2 ms
64 bytes from fra24s02-in-x0e.1e100.net (2a00:1450:4001:803::200e): icmp_seq=11 ttl=115 time=78.4 ms
64 bytes from fra24s02-in-x0e.1e100.net (2a00:1450:4001:803::200e): icmp_seq=12 ttl=115 time=74.9 ms
64 bytes from fra24s02-in-x0e.1e100.net (2a00:1450:4001:803::200e): icmp_seq=13 ttl=115 time=25.9 ms
^C
--- youtube.com ping statistics ---
13 packets transmitted, 13 received, 0% packet loss, time 12018ms
rtt min/avg/max/mdev = 22.158/41.177/78.385/20.963 ms
我还查看了nslookup
nslookup google.com
Server: 127.0.0.53
Address: 127.0.0.53#53
Non-authoritative answer:
Name: google.com
Address: 142.250.186.46
Name: google.com
Address: 2a00:1450:4001:801::200e
nslookup github.com
Server: 127.0.0.53
Address: 127.0.0.53#53
Non-authoritative answer:
Name: github.com
Address: 140.82.121.4
如果我在另一个系统上尝试,github 的 IP 地址确实指向 github.com。因此可能是 DNS 问题。但到目前为止还没有解决它
知道如何解决这个问题吗?
谢谢
我已经设法部分解决了这个问题。只要我直接连接到主路由器,一切都会正常工作,但一旦我连接到 wifi 中继器,连接问题就开始了。到最后 24 小时为止,与中继器的连接都没有问题。如果有人能解决这个问题,我会非常乐意接受。
答案1
是不是你的路由器或互联网提供商的问题?你也可以检查一下设置>网络>网络代理并检查它是否被禁用、自动还是手动。改变其情况,看看是否能解决问题。