执行 ping 操作时无法访问目标主机,但笔记本电脑已连接到互联网,并且 ISP 调制解调器可以看到它

执行 ping 操作时无法访问目标主机,但笔记本电脑已连接到互联网,并且 ISP 调制解调器可以看到它

我有一台 PC 和一台笔记本电脑连接到本地网络。两者都有 Ubuntu 18.04.4 桌面版,并且两者都对调制解调器可见:

在此处输入图片描述

但是当我尝试从 PC ping 笔记本电脑时,它显示Destination Host Unreachable::

(base) marco@pc:~$ sudo ping 192.168.1.9
PING 192.168.1.9 (192.168.1.9) 56(84) bytes of data.
From 192.168.1.7 icmp_seq=1 Destination Host Unreachable
From 192.168.1.7 icmp_seq=2 Destination Host Unreachable

笔记本电脑上没有活动的防火墙:

(base) marco@marco-U365G:~$ sudo ufw status
Status: inactive

这是笔记本电脑的 /etc/netplan/01-network-manager-all.yaml:

network
  version: 2
  renderer: NetworkManager
  # renderer: networkd
  ethernets:
    enp3s0:
      dhcp4: no
      addresses: [192.168.1.9/24]
      gateway4: 192.168.1.1
      nameservers:
        addresses: [8.8.8.8,8.8.4.4]

我尝试在 PC 和笔记本电脑上使用 nmap:

(base) marco@pc:~$ sudo nmap -sn 192.168.1.0/24

Starting Nmap 7.60 ( https://nmap.org ) at 2021-05-06 18:28 CEST
Nmap scan report for www.adsl.vf (192.168.1.1)
Host is up (0.00045s latency).
MAC Address: 74:36:6D:9A:5A:63 (Unknown)
Nmap scan report for pc (192.168.1.7)
Host is up.
Nmap done: 256 IP addresses (2 hosts up) scanned in 3.77 seconds

从笔记本电脑来看:

(base) marco@marco-U365G:~$ nmap -sn 192.168.1.9/24

Starting Nmap 7.60 (https://nmap.org ) at 2021-05-06 18:29 CEST
Nmap scan report for_gateway (192.168.1.1)
Host is uo (0.00075s latency)
Nmap scan report for marco-U365C (192.168.1.9)
Host is uo (0.000054s latency)
Nmap done: 256 IP addresses (2 hosts up) scanned in 3.21 seconds

在笔记本电脑中,我还 ping 了本地主机,以检查网络接口是否启动:

(base) marco@marco-U354G:~$ oung 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.094 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.085 ms

实际上,我意识到 ping 其他设备也不起作用:

在此处输入图片描述

(base) marco@pc:~$ sudo ping 192.168.1.3 PING 192.168.1.3 (192.168.1.3) 56(84) 字节数据。来自 192.168.1.7 icmp_seq=1 目标主机不可达

我意识到这种情况正在发生,可能是因为互联网服务提供商更改了路由器。

如何解决这个问题?

相关内容