ubuntu 20.04 網路問題 - 某些網站無法存取

ubuntu 20.04 網路問題 - 某些網站無法存取

從今天起,我無法透過瀏覽器或在終端機中 ping 存取某些網站,而其他網站仍然可以存取。我使用的是 ubuntu 20.04,我沒有進行任何網路設定更改或類似操作。例如www.google.com或者www.youtube.com可以訪問但是www.github.com或者www.askubuntu.com不是。

ping youtube VS github

如您所見,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

它不是來自您的路由器或網路供應商嗎?你也可以檢查設定 > 網路 > 網路代理並檢查它是否已停用、自動或手動。改變它的情況,看看是否能解決問題。

相關內容