全新安裝 Ubuntu 22.04 後無法存取本機網路位址

全新安裝 Ubuntu 22.04 後無法存取本機網路位址

我有兩台筆記型電腦在無線網路中。網路存取對他們倆來說都運作良好。只要兩者都運行“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。

相關內容