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

版权声明:©来自CSDN博客作者"李在奋斗"的原创作品,如需转载,请注明出处 https://blog.csdn.net/qq_31725371/article/details/83085651

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  

猜你喜欢

转载自blog.csdn.net/qq_31725371/article/details/83085651