无法连接到互联网。nslookup 输出“;; 通信错误至 127.0.0.53#53: 超时”

无法连接到互联网。nslookup 输出“;; 通信错误至 127.0.0.53#53: 超时”

VPN 客户端停止响应后,我发现自己无法上网。我卸载了 VPN 客户端并从 gnome-control-center 中删除了 VPN 条目,以为这样可以解决问题。但不幸的是我的互联网无法正常工作。以下是我浏览互联网后尝试的命令,我认为 DNS 或某些网络配置存在一些问题。

网络接口显示我的无线接口是“wlp3s0”
$ ifconfig
br-113d6b3aff1c: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.21.0.1  netmask 255.255.0.0  broadcast 172.21.255.255
        ether 02:42:e8:6d:c5:3f  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-700caf3b9fcc: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:40:c2:d4:e3  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-b06e3f395e66: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.19.0.1  netmask 255.255.0.0  broadcast 172.19.255.255
        ether 02:42:74:90:1f:cf  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        ether 02:42:49:35:3c:fc  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp2s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 98:e7:43:3e:de:fb  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ipv6leakintrf0: flags=195<UP,BROADCAST,RUNNING,NOARP>  mtu 1500
        inet6 fe80::8fe8:e906:5cee:7911  prefixlen 64  scopeid 0x20<link>
        inet6 fdeb:446c:912d:8da::  prefixlen 64  scopeid 0x0<global>
        ether e2:bb:a0:58:54:41  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 680  bytes 69423 (69.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 2742  bytes 204246 (204.2 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2742  bytes 204246 (204.2 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

pvpnksintrf0: flags=195<UP,BROADCAST,RUNNING,NOARP>  mtu 1500
        inet 100.85.0.1  netmask 255.255.255.0  broadcast 100.85.0.255
        inet6 fdeb:446c:912d:8da::  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::3c92:cf98:c28d:3a21  prefixlen 64  scopeid 0x20<link>
        ether ca:8c:af:5d:b6:0d  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3  bytes 126 (126.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

pvpnroutintrf0: flags=195<UP,BROADCAST,RUNNING,NOARP>  mtu 1500
        inet 100.85.0.1  netmask 255.255.255.0  broadcast 100.85.0.255
        inet6 fdeb:446c:912d:8da::  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::ca86:f224:7976:ebc8  prefixlen 64  scopeid 0x20<link>
        ether 66:31:57:9b:2a:d0  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 690  bytes 69826 (69.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.61.73  netmask 255.255.240.0  broadcast 172.17.63.255
        inet6 fe80::5787:7494:415:36  prefixlen 64  scopeid 0x20<link>
        ether e8:6f:38:cd:58:d7  txqueuelen 1000  (Ethernet)
        RX packets 27  bytes 6089 (6.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 73  bytes 8899 (8.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
显示路由表显示“172.17.63.254”是“wlp3s0”的默认网关
$ ip route
0.0.0.0/2 dev pvpnroutintrf0 proto static scope link metric 97 
default via 100.85.0.1 dev pvpnksintrf0 proto static metric 98 
default via 172.17.63.254 dev wlp3s0 proto dhcp metric 600 
64.0.0.0/4 dev pvpnroutintrf0 proto static scope link metric 97 
80.0.0.0/5 dev pvpnroutintrf0 proto static scope link metric 97 
88.0.0.0/8 dev pvpnroutintrf0 proto static scope link metric 97 
89.0.0.0/11 dev pvpnroutintrf0 proto static scope link metric 97 
89.32.0.0/14 dev pvpnroutintrf0 proto static scope link metric 97 
89.36.0.0/15 dev pvpnroutintrf0 proto static scope link metric 97 
89.38.0.0/18 dev pvpnroutintrf0 proto static scope link metric 97 
89.38.64.0/19 dev pvpnroutintrf0 proto static scope link metric 97 
89.38.96.0/23 dev pvpnroutintrf0 proto static scope link metric 97 
89.38.98.0/24 dev pvpnroutintrf0 proto static scope link metric 97 
89.38.99.0/25 dev pvpnroutintrf0 proto static scope link metric 97 
89.38.99.128/27 dev pvpnroutintrf0 proto static scope link metric 97 
89.38.99.160/28 dev pvpnroutintrf0 proto static scope link metric 97 
89.38.99.176/29 dev pvpnroutintrf0 proto static scope link metric 97 
89.38.99.184/30 dev pvpnroutintrf0 proto static scope link metric 97 
89.38.99.189 dev pvpnroutintrf0 proto static scope link metric 97 
89.38.99.190/31 dev pvpnroutintrf0 proto static scope link metric 97 
89.38.99.192/26 dev pvpnroutintrf0 proto static scope link metric 97 
89.38.100.0/22 dev pvpnroutintrf0 proto static scope link metric 97 
89.38.104.0/21 dev pvpnroutintrf0 proto static scope link metric 97 
89.38.112.0/20 dev pvpnroutintrf0 proto static scope link metric 97 
89.38.128.0/17 dev pvpnroutintrf0 proto static scope link metric 97 
89.39.0.0/16 dev pvpnroutintrf0 proto static scope link metric 97 
89.40.0.0/13 dev pvpnroutintrf0 proto static scope link metric 97 
89.48.0.0/12 dev pvpnroutintrf0 proto static scope link metric 97 
89.64.0.0/10 dev pvpnroutintrf0 proto static scope link metric 97 
89.128.0.0/9 dev pvpnroutintrf0 proto static scope link metric 97 
90.0.0.0/7 dev pvpnroutintrf0 proto static scope link metric 97 
92.0.0.0/6 dev pvpnroutintrf0 proto static scope link metric 97 
96.0.0.0/3 dev pvpnroutintrf0 proto static scope link metric 97 
100.85.0.0/24 dev pvpnroutintrf0 proto kernel scope link src 100.85.0.1 metric 97 
100.85.0.0/24 dev pvpnksintrf0 proto kernel scope link src 100.85.0.1 metric 98 
128.0.0.0/1 dev pvpnroutintrf0 proto static scope link metric 97 
169.254.0.0/16 dev pvpnroutintrf0 scope link metric 1000 
172.17.0.0/16 dev br-700caf3b9fcc proto kernel scope link src 172.17.0.1 linkdown 
172.17.48.0/20 dev wlp3s0 proto kernel scope link src 172.17.61.73 metric 600 
172.18.0.0/16 dev docker0 proto kernel scope link src 172.18.0.1 linkdown 
172.19.0.0/16 dev br-b06e3f395e66 proto kernel scope link src 172.19.0.1 linkdown 
172.21.0.0/16 dev br-113d6b3aff1c proto kernel scope link src 172.21.0.1 linkdown
nslookup google 抛出错误
$ nslookup google.com
;; communications error to 127.0.0.53#53: timed out
;; communications error to 127.0.0.53#53: timed out
;; communications error to 127.0.0.53#53: timed out
;; no servers could be reached

但是我可以从我的系统成功 ping 127.0.0.53。

ping 默认网关也成功
$ ping 172.17.63
PING 172.17.63.254 (172.17.63.254) 56(84) bytes of data.
64 bytes from 172.17.63.254: icmp_seq=1 ttl=254 time=7.36 ms
64 bytes from 172.17.63.254: icmp_seq=2 ttl=254 time=2.62 ms
64 bytes from 172.17.63.254: icmp_seq=3 ttl=254 time=2.51 ms

1.1.1.1是 Cloudflare 运营的公共递归 DNS 解析器。详细了解这里。同样,8.8.8.8 是谷歌的 DNS 解析器。 127.0.0.53是本地缓存存根解析器,它进一步将 DNS 查询定向到上游 DNS 服务器

对 `1.1.1.1` 执行 ping 操作失败
$ ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
^C
--- 1.1.1.1 ping statistics ---
262 packets transmitted, 0 received, 100% packet loss, time 267264ms
同样,ping `8.8.8.8` 失败
$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
6 packets transmitted, 0 received, 100% packet loss, time 5119ms
尝试 journalctl 时出现一些警告(?)
$ journalctl -u systemd-resolved -f
Sep 24 14:12:11 the-laptop systemd-resolved[533]: Using degraded feature set UDP instead of TCP for DNS server ::1.
Sep 24 14:12:11 the-laptop systemd-resolved[533]: Using degraded feature set UDP instead of TCP for DNS server ::1.
Sep 24 14:12:21 the-laptop systemd-resolved[533]: Using degraded feature set TCP instead of UDP for DNS server ::1.
Sep 24 14:12:21 the-laptop systemd-resolved[533]: Using degraded feature set TCP instead of UDP for DNS server ::1.
Sep 24 14:12:21 the-laptop systemd-resolved[533]: Using degraded feature set UDP instead of TCP for DNS server ::1.
Sep 24 14:12:21 the-laptop systemd-resolved[533]: Using degraded feature set UDP instead of TCP for DNS server ::1.
^C

尝试通过以下方式摆脱“功能退化集...”。但我仍然无法连接到互联网。

如果有人能解释一下哪里出了问题以及我该如何修复,我将不胜感激。谢谢!

答案1

TLDR;永久删除 VPN 客户端创建的网络接口/设备后,我就能连接到互联网。

当我遇到讨论时,我运行了以下命令来列出通过nmcli

$ nmcli connection show

我发现 VPN 客户端的接口/设备仍然处于活动状态(因为它们在终端输出中显示为绿色)。

因此,我通过运行以下命令删除了链接到 VPN 客户端的每个接口/设备(注意:可以从我们之前运行的 show 命令中找到每个设备的 UUID):

$ nmcli connection delete <UUID>

发布这些步骤后,我成功地连接到了互联网。感谢巴里为我指明方向!我还在学习,所以请随时纠正我,如果有人能解释为什么会发生这个问题,那就太好了。谢谢!

相关内容