我有两台笔记本电脑,它们都接入了无线网络。两台笔记本电脑都可以正常上网。只要两台笔记本电脑都运行“Ubuntu 桌面 20.04”,它们也可以在本地网络中互相访问(ping 192.168...)。
最近我在其中一个上安装了“Ubuntu 桌面 22.04”(全新安装,未升级)。两者仍然可以通过无线路由器访问互联网,但使用 ping(目标主机无法访问)或 ssh(ssh:连接到主机 192.168.0.213 端口 22:没有到主机的路由)无法再互相访问。
我该怎么做才能让这一切再次成为可能?
附加信息 :
装有 Ubuntu 20.04 的笔记本电脑:
$ ip addr
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: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether f0:de:f1:3d:4a:7e brd ff:ff:ff:ff:ff:ff
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:24:d7:86:0e:c0 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.213/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp3s0
valid_lft 3189sec preferred_lft 3189sec
inet6 2a02:908:671:ae80:bcc5:1967:7578:d90f/64 scope global temporary dynamic
valid_lft 74660sec preferred_lft 31460sec
inet6 2a02:908:671:ae80:1221:e3ff:b1c1:ec8c/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 74660sec preferred_lft 31460sec
inet6 fe80::66c9:eda5:134f:7837/64 scope link noprefixroute
valid_lft forever preferred_lft forever
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:41:7d:1a brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
5: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN group default qlen 1000
link/ether 52:54:00:41:7d:1a brd ff:ff:ff:ff:ff:ff
6: mpqemubr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:a2:48:4b brd ff:ff:ff:ff:ff:ff
inet 10.10.141.1/24 brd 10.10.141.255 scope global mpqemubr0
valid_lft forever preferred_lft forever
7: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:9b:c6:47:bd 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
$ ip route
default via 192.168.0.1 dev wlp3s0 proto dhcp metric 600
10.10.141.0/24 dev mpqemubr0 proto kernel scope link src 10.10.141.1 linkdown
169.254.0.0/16 dev wlp3s0 scope link metric 1000
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
192.168.0.0/24 dev wlp3s0 proto kernel scope link src 192.168.0.213 metric 600
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown
$ ip neigh
192.168.0.1 dev wlp3s0 lladdr 34:2c:c4:31:64:d1 DELAY
fe80::362c:c4ff:fe31:64d1 dev wlp3s0 lladdr 34:2c:c4:31:64:d1 router REACHABLE
装有 Ubuntu 22.04 的笔记本电脑:
$ ip addr
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: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether f0:de:f1:78:4e:5a brd ff:ff:ff:ff:ff:ff
4: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether a0:88:b4:d2:f7:3c brd ff:ff:ff:ff:ff:ff
inet 192.168.0.24/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp3s0
valid_lft 2601sec preferred_lft 2601sec
inet6 2a02:908:671:ae80:861f:42bf:a369:89fe/64 scope global temporary dynamic
valid_lft 74080sec preferred_lft 30880sec
inet6 2a02:908:671:ae80:aaa3:6bfa:1117:d7a1/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 74080sec preferred_lft 30880sec
inet6 fe80::ca1:8cc6:59db:6bf6/64 scope link noprefixroute
valid_lft forever preferred_lft forever
5: wwx028037ec0200: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 02:80:37:ec:02:00 brd ff:ff:ff:ff:ff:ff
$ ip route
default via 192.168.0.1 dev wlp3s0 proto dhcp metric 600
169.254.0.0/16 dev wlp3s0 scope link metric 1000
192.168.0.0/24 dev wlp3s0 proto kernel scope link src 192.168.0.24 metric 600
$ ip neigh
192.168.0.213 dev wlp3s0 FAILED
192.168.0.1 dev wlp3s0 lladdr 34:2c:c4:31:64:d1 REACHABLE
fe80::362c:c4ff:fe31:64d1 dev wlp3s0 lladdr 34:2c:c4:31:64:d1 router REACHABLE
ps 双方的防火墙均处于非活动状态:$ sudo ufw status
状态:不活跃
答案1
我也遇到过类似的问题,但是,就我而言,所有版本的 ubuntu 都会出现问题,即无法 ping 或以其他方式访问我网络中的 ubuntu 系统。当我从 2 线 DSL 调制解调器切换到 TP-Link 路由器时,它就开始了。我的解决方法是在 /etc/hosts 中硬编码本地 ip 地址。我的一个 ubuntu 系统是 22.04,另一个是 16.04。