经过一次看似无害的更新后,我的Ubuntu 22.04.5 LTS
系统不再在以太网或 wifi 接口上自动配置 ipv4 网络。Ipv6 工作正常,手动配置 ipv4 也正常。
以下是有问题的更新的历史记录:
libpskc0:amd64 (2.6.7-3build1, 2.6.7-3ubuntu0.1),
cups-filters:amd64 (1.28.15-0ubuntu1.3, 1.28.15-0ubuntu1.4),
ovmf:amd64 (2022.02-3ubuntu0.22.04.2, 2022.02-3ubuntu0.22.04.3),
google-chrome-stable:amd64 (129.0.6668.70-1, 129.0.6668.100-1),
ubuntu-advantage-desktop-daemon:amd64 (1.10~22.04.1, 1.10.ubuntu0.22.04.2),
libfontembed1:amd64 (1.28.15-0ubuntu1.3, 1.28.15-0ubuntu1.4),
cups-filters-core-drivers:amd64 (1.28.15-0ubuntu1.3, 1.28.15-0ubuntu1.4),
nodejs:amd64 (20.17.0-1nodesource1, 20.18.0-1nodesource1),
cups-browsed:amd64 (1.28.15-0ubuntu1.3, 1.28.15-0ubuntu1.4),
brave-browser:amd64 (1.70.119, 1.70.126),
code:amd64 (1.93.1-1726079302, 1.94.2-1728494015),
kubectl:amd64 (1:494.0.0-0, 1:496.0.0-0),
libcupsfilters1:amd64 (1.28.15-0ubuntu1.3, 1.28.15-0ubuntu1.4),
ruby-webrick:amd64 (1.7.0-3, 1.7.0-3ubuntu0.1)
我尝试回滚libpskc0
,但nodejs
无济于事。以前的版本ovmf
在存储库中不可用。
这是一个有效的手动配置(/etc/NetworkManager/system-connections/Wired\ connection\ 1.nmconnection
):
[connection]
id=Wired connection 1
uuid=a9d94420-f026-3f3f-bfdd-8142ae130e71
type=ethernet
autoconnect-priority=-100
[ethernet]
[ipv4]
address1=192.168.0.123/24,192.168.0.1
dns=8.8.8.8;
method=manual
[ipv6]
addr-gen-mode=stable-privacy
method=auto
[proxy]
还有一个不会自动运行的:
[connection]
id=Wired connection 1
uuid=a9d94420-f026-3f3f-bfdd-8142ae130e71
type=ethernet
autoconnect-priority=-100
[ethernet]
[ipv4]
method=auto
[ipv6]
addr-gen-mode=stable-privacy
method=auto
[proxy]
ifconfig
以下是自动配置不起作用的结果:
enx089204536db9: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 2601:207:680:29e2:d864:1ed3:f424:6a31 prefixlen 64 scopeid 0x0<global>
inet6 fe80::b92c:2b5:5510:e58b prefixlen 64 scopeid 0x20<link>
inet6 2601:207:680:29e2:fb45:144e:3353:9272 prefixlen 64 scopeid 0x0<global>
ether 08:92:04:53:6d:b9 txqueuelen 1000 (Ethernet)
RX packets 40433 bytes 39759055 (39.7 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 18507 bytes 7483707 (7.4 MB)
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 16119 bytes 1722379 (1.7 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 16119 bytes 1722379 (1.7 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:78:d9:8c 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
wlp0s20f3: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 4c:03:4f:c3:f5:5f txqueuelen 1000 (Ethernet)
RX packets 23 bytes 6925 (6.9 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 33 bytes 6203 (6.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
有没有想过是什么原因导致了这种情况?如何解决?我不介意手动配置有线连接,但这是一台笔记本电脑,每次连接新的 wifi 时都这样做会非常麻烦。
感谢您的帮助。
嗯。解决这个问题的方法是经常检查你的路由器。我花了大量时间试图解决这个问题,直到我的手机断开了与 wifi 的连接,无法重新连接。原来我的 Linksys 路由器出于某种原因决定停止在 ipv4 上发放 DHCP 租约。
重启路由器就解决了。希望我下次能更聪明一点。