Ubuntu和Mac在同一个家庭网络中找不到对方

如何解决Ubuntu和Mac在同一个家庭网络中找不到对方

这里是设置:

我有 4 台设备连接到我的家庭 Wifi,我可以确认它们的 IP 地址:

ipad : 192.168.1.19
phone : 192.168.1.5
PC with Ubuntu 18.04 : 192.168.1.14
Macbook Pro : 192.168.1.3 

所有 4 个设备都通过 wifi 连接。没有以太网电缆连接

在我的 PC (Ubuntu 18.04) 上,我可以使用 arp -a 来发现 ipad 和手机:

john@home:~$ arp -a 
? (192.168.1.19) at 92:c4:78:3c:46:16 [ether] on wlo1
_gateway (192.168.1.1) at e4:7e:66:1f:bf:4c [ether] on wlo1
? (192.168.1.5) at 26:36:46:f9:69:83 [ether] on wlo1

但无法扫描 Macbook Pro。

在 Macbook Pro 上,arp -a 给出以下结果:

john@macbook:~$ arp -a 
? (192.168.1.1) at e4:7e:66:1f:bf:4c on en0 ifscope [ethernet]
? (192.168.1.3) at 98:5a:eb:8d:ef:e2 on en0 ifscope permanent [ethernet]
? (192.168.1.5) at 26:36:46:f9:69:83 on en0 ifscope [ethernet]
? (192.168.1.14) at 4:33:c2:c4:2:a2 on en0 ifscope [ethernet]
? (192.168.1.19) at 92:c4:78:3c:46:16 on en0 ifscope [ethernet]
? (224.0.0.251) at 1:0:5e:0:0:fb on en0 ifscope permanent [ethernet]
? (224.0.0.252) at 1:0:5e:0:0:fc on en0 ifscope permanent [ethernet]
? (239.255.255.250) at 1:0:5e:7f:ff:fa on en0 ifscope permanent [ethernet]

如您所见,可以找到 ipad、手机和 PC。 问题是可以ping到ipad和手机是可以的,但是ping到PC却失败了:

john@macbook:~$ ping 192.168.1.19
PING 192.168.1.19 (192.168.1.19): 56 data bytes
64 bytes from 192.168.1.19: icmp_seq=0 ttl=64 time=42.713 ms
64 bytes from 192.168.1.19: icmp_seq=1 ttl=64 time=43.392 ms
64 bytes from 192.168.1.19: icmp_seq=2 ttl=64 time=2.472 ms
64 bytes from 192.168.1.19: icmp_seq=3 ttl=64 time=40.964 ms


john@macbook:~$ ping 192.168.1.5
PING 192.168.1.5 (192.168.1.5): 56 data bytes
64 bytes from 192.168.1.5: icmp_seq=0 ttl=64 time=185.370 ms
64 bytes from 192.168.1.5: icmp_seq=1 ttl=64 time=7.653 ms
64 bytes from 192.168.1.5: icmp_seq=2 ttl=64 time=853.861 ms
64 bytes from 192.168.1.5: icmp_seq=3 ttl=64 time=6.430 ms
64 bytes from 192.168.1.5: icmp_seq=4 ttl=64 time=147.860 ms
64 bytes from 192.168.1.5: icmp_seq=5 ttl=64 time=248.788 ms


john@macbook:~$ ping 192.168.1.14
PING 192.168.1.14 (192.168.1.14): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3

我已确认防火墙 ID 在装有 Ubuntu 18.04 的 PC 上处于非活动状态:

john@home:~$ sudo ufw status
[sudo] password for john: 
Status: inactive

这里出了什么问题?为什么 Macbook Pro 对 PC 不可见,而 PC 对 MacBook 可见?为什么 ping 失败?

以下是我第二天观察到的:

现在我在 PC 中执行 arp -a 命令,神秘地我可以在输出中看到 Macbook 设备和电话:


_gateway (192.168.1.1) at e4:7e:66:1f:bf:4c [ether] on wlo1
? (192.168.1.5) at 26:36:46:f9:69:83 [ether] on wlo1
? (192.168.1.3) at <incomplete> on wlo1

我不知道怎么突然出现在arp表中。但是,ping 会给出:

john@home:~$ ping 192.168.1.3
PING 192.168.1.3 (192.168.1.14) 56(84) bytes of data.
From 192.168.1.14 icmp_seq=1 Destination Host Unreachable
From 192.168.1.14 icmp_seq=2 Destination Host Unreachable
From 192.168.1.14 icmp_seq=3 Destination Host Unreachable
From 192.168.1.14 icmp_seq=4 Destination Host Unreachable
From 192.168.1.14 icmp_seq=5 Destination Host Unreachable
From 192.168.1.14 icmp_seq=6 Destination Host Unreachable
From 192.168.1.14 icmp_seq=7 Destination Host Unreachable
From 192.168.1.14 icmp_seq=8 Destination Host Unreachable
From 192.168.1.14 icmp_seq=9 Destination Host Unreachable
^C
--- 192.168.1.3 ping statistics ---
10 packets transmitted,0 received,+9 errors,100% packet loss,time 9195ms
pipe 4
john@home:~$ ^C

为什么PC端不一致?有时您可以从 PC 上发现 Macbook,有时则不能。

而且您无法在 PC 和 Macbook 之间以任何方式 ping。但是你可以从 Macbook ping Phone/ipad?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-