linux使用ping的通内外网,但是一直提示:From 192.168.1.3 (192.168.1.3) icmp_seq=1 Redirect Network(New nexthop: gatewa

[root@localhost ~]# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.3 icmp_seq=1 Redirect Network(New nexthop: 192.168.1.1)
From 192.168.1.3: icmp_seq=1 Redirect Network(New nexthop: 192.168.1.1)
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=1.36 ms

[root@localhost ~]# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 192.168.1.3 icmp_seq=1 Redirect Network(New nexthop: 192.168.1.1)
From 192.168.1.3: icmp_seq=1 Redirect Network(New nexthop: 192.168.1.1)
64 bytes from 8.8.8.8: icmp_seq=1 ttl=115 time=188 ms

[root@localhost ~]# ping aliyun.com
PING aliyun.com (140.205.32.13) 56(84) bytes of data.
From 192.168.1.3 (192.168.1.3) icmp_seq=1 Redirect Network(New nexthop: gateway (192.168.1.1))
From 192.168.1.3 (192.168.1.3): icmp_seq=1 Redirect Network(New nexthop: gateway (192.168.1.1))
64 bytes from 140.205.32.13 (140.205.32.13): icmp_seq=1 ttl=41 time=10.3 ms

经过分析,内网外网都ping的通,发现是开了wifi共享的原因,主机被识别为路由了

解决:

//注释掉,再重启网络服务即可
[root@localhost ~]# vim /etc/sysconfig/network
# NETWORKING=yes
# HOSTNAME=localhost
# GATEWAY=192.168.1.1  
GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e added ecosystem file for PM2 4 年前
5def40a3 Add host customization support for the NodeJS version 4 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐