以下是一些可能有助于诊断的命令的返回结果:

以下是一些可能有助于诊断的命令的返回结果:

在过去的 15~20 天里,我遇到了连接不一致的问题。我已经尝试了几件事,但大多数情况下我不能说它们是否有帮助。

我可以肯定地说:

  • 当我从冬眠中回来时,虽然我仍然连接着WIFI,但我无法访问互联网上的任何内容。
  • Chrome回归DNS_PROBE_FINISHED_NXDOMAIN,更换浏览器并不能解决问题。
  • 断开连接并再次连接也没有帮助。
  • 该命令sudo dhclient -v有效时可以解决问题。 (详情如下)
  • 这不是我的 ISP,因为互联网仍然可以在我的台式机和智能手机上运行(连接到相同的 wifi)。 [但也许是路由器/调制解调器问题?]

这些是奇怪的细节:

  • 有时我仍然可以 ping 通站点,但无法访问它们并且有时ping 不起作用,并且返回connect: Network is unreachable
  • 重新启动有时解决了问题,有时却不能。
  • 有时问题自己解决了,我什么也没做。
  • 前几次发生此问题时,我尝试将 DNS 从自动更改为手动 (8.8.8.8) 或相反,具体取决于我上次离开的方式。它似乎有效,但现在不起作用,所以也许它从未采取任何措施来解决问题,而问题却自行解决了?

正如我所说,sudo dhclient -v当返回完成时运行可以解决问题,如下所示:

来自 192.168.15.1 的 192.168.15.4 的 DHCPACK

绑定到 192.168.15.4——17437 秒后更新。

然而,有时,当我运行命令时它返回:

未收到 DHCPOFFERS。

持久数据库中没有工作租约 - 休眠。

而且问题仍然存在。

以下是一些可能有助于诊断的命令的返回结果:

lspci

00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 0b)
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b)
00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 0b)
00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04)
00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 1 (rev e4)
00:1c.2 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 3 (rev e4)
00:1c.3 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 4 (rev e4)
00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)
02:00.0 Network controller: Intel Corporation Wireless 7260 (rev 73)
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTL8411B PCI Express Card Reader (rev 01)
03:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 12)

如果配置

command not found

ip路由显示

169.254.0.0/16 dev br-7905315c0c67 scope link metric 1000 linkdown 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 
172.18.0.0/16 dev br-7905315c0c67 proto kernel scope link src 172.18.0.1 linkdown 
172.19.0.0/16 dev br-bb285dfa325a proto kernel scope link src 172.19.0.1 linkdown 

IP地址

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp3s0f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether b8:2a:72:c0:da:1d brd ff:ff:ff:ff:ff:ff
    inet 169.254.8.72/16 brd 169.254.255.255 scope link enp3s0f1:avahi
       valid_lft forever preferred_lft forever
3: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 80:86:f2:cc:95:7f brd ff:ff:ff:ff:ff:ff
    inet 192.168.15.4/24 brd 192.168.15.255 scope global dynamic wlp2s0
       valid_lft 42972sec preferred_lft 42972sec
    inet6 2804:7f2:2980:fa68:50c4:6476:6282:be9/64 scope global dynamic noprefixroute 
       valid_lft 43168sec preferred_lft 43168sec
    inet6 fe80::1d23:31f:b217:e60d/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:b9:59:21:ea brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
5: br-7905315c0c67: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:ca:dc:1a:34 brd ff:ff:ff:ff:ff:ff
    inet 172.18.0.1/16 brd 172.18.255.255 scope global br-7905315c0c67
       valid_lft forever preferred_lft forever
6: br-bb285dfa325a: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:45:ee:9f:bd brd ff:ff:ff:ff:ff:ff
    inet 172.19.0.1/16 brd 172.19.255.255 scope global br-bb285dfa325a
       valid_lft forever preferred_lft forever

dhclient -v 当它不起作用时

Listening on LPF/br-bb285dfa325a/02:42:45:ee:9f:bd
Sending on   LPF/br-bb285dfa325a/02:42:45:ee:9f:bd
Listening on LPF/br-7905315c0c67/02:42:ca:dc:1a:34
Sending on   LPF/br-7905315c0c67/02:42:ca:dc:1a:34
Listening on LPF/docker0/02:42:b9:59:21:ea
Sending on   LPF/docker0/02:42:b9:59:21:ea
Listening on LPF/wlp2s0/80:86:f2:cc:95:7f
Sending on   LPF/wlp2s0/80:86:f2:cc:95:7f
Listening on LPF/enp3s0f1/b8:2a:72:c0:da:1d
Sending on   LPF/enp3s0f1/b8:2a:72:c0:da:1d
Sending on   Socket/fallback
DHCPDISCOVER on br-bb285dfa325a to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on br-7905315c0c67 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on docker0 to 255.255.255.255 port 67 interval 4
DHCPREQUEST for 192.168.15.4 on wlp2s0 to 255.255.255.255 port 67
DHCPDISCOVER on enp3s0f1 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on docker0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on br-7905315c0c67 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on enp3s0f1 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on br-bb285dfa325a to 255.255.255.255 port 67 interval 7
DHCPREQUEST for 192.168.15.4 on wlp2s0 to 255.255.255.255 port 67
DHCPDISCOVER on enp3s0f1 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on br-bb285dfa325a to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on br-7905315c0c67 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on docker0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on wlp2s0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on br-bb285dfa325a to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on enp3s0f1 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on wlp2s0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on br-7905315c0c67 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on br-bb285dfa325a to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on docker0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on enp3s0f1 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on wlp2s0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on br-bb285dfa325a to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on br-7905315c0c67 to 255.255.255.255 port 67 interval 19
DHCPDISCOVER on br-bb285dfa325a to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on enp3s0f1 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on docker0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlp2s0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on br-bb285dfa325a to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on docker0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on wlp2s0 to 255.255.255.255 port 67 interval 15
DHCPOFFER of 192.168.15.4 from 192.168.15.1
DHCPREQUEST for 192.168.15.4 on wlp2s0 to 255.255.255.255 port 67
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

dhclient -v 当它起作用时

Listening on LPF/br-bb285dfa325a/02:42:3a:6c:f8:53
Sending on   LPF/br-bb285dfa325a/02:42:3a:6c:f8:53
Listening on LPF/br-7905315c0c67/02:42:a9:2c:f1:4d
Sending on   LPF/br-7905315c0c67/02:42:a9:2c:f1:4d
Listening on LPF/docker0/02:42:47:5b:95:10
Sending on   LPF/docker0/02:42:47:5b:95:10
Listening on LPF/wlp2s0/80:86:f2:cc:95:7f
Sending on   LPF/wlp2s0/80:86:f2:cc:95:7f
Listening on LPF/enp3s0f1/b8:2a:72:c0:da:1d
Sending on   LPF/enp3s0f1/b8:2a:72:c0:da:1d
Sending on   Socket/fallback
DHCPDISCOVER on br-bb285dfa325a to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on br-7905315c0c67 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on docker0 to 255.255.255.255 port 67 interval 6
DHCPREQUEST for 192.168.15.4 on wlp2s0 to 255.255.255.255 port 67
DHCPDISCOVER on enp3s0f1 to 255.255.255.255 port 67 interval 5
DHCPREQUEST for 192.168.15.4 on wlp2s0 to 255.255.255.255 port 67
DHCPDISCOVER on enp3s0f1 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on br-bb285dfa325a to 255.255.255.255 port 67 interval 7
DHCPREQUEST for 192.168.15.4 on wlp2s0 to 255.255.255.255 port 67
DHCPACK of 192.168.15.4 from 192.168.15.1
bound to 192.168.15.4 -- renewal in 17437 seconds.

>> 编辑

在 @Fubar 回答之后,我做了一个apt updateandapt upgrade并注意到了很多警告可能缺少固件在此输入图像描述不确定以前是否发生过(如果发生过,从未注意到)或是否相关。之后我就无法重现这个问题,这可能是一件好事,只要它不会“回来”。

答案1

这可能更多地与所涉及的驱动程序有关,而不是与操作系统有关。例如,在 Windows 中从休眠状态中出来是由操作系统管理的,但实际上是由其他软件位(如驱动程序)完成的。如果驱动程序不能正确处理唤醒,则其工作效果可能会不一致。我建议,作为测试,当您下次遇到问题时,使用lspci或类似的方法来找出驱动程序的名称,然后lsmod查看它是否作为模块加载,而不是内置到内核中。如果是这样,您可以尝试使用rmmod或卸载modprobe -r,然后使用 重新加载modprobe。从上面提供的信息来看,您感兴趣的模块是 r8168 驱动程序,它是 RealTek 官方驱动程序。该模块可能存在依赖关系,因此您可能需要稍微尝试一下以确保获得所有正确的模块,尽管网络现在可能比我使用它时具有依赖关系。对所有位进行排序后,您可以创建一个 shell 脚本来执行您使用的所有命令,然后在遇到问题时运行它,而不是每次都尝试记住顺序。所有这些,包括任何 shell 脚本,显然都需要以 root 身份运行或使用 sudo 运行。

当然,这并不肯定会起作用,但它可能会有所帮助。你也可以检查这里获取适配器的最新固件以确保其处于最新状态。如果不是,更新它也可能有助于解决该问题。只是几个值得一看的地方。

相关内容