1. 程式人生 > >linux使用ping的通內外網,但是有提示From 192.168.1.3 (192.168.1.3) icmp_seq=1 Redirect Network(New nexthop: gatewa

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

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

[[email protected] ~]# 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

[
[email protected]
~]# 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 [[email protected]
~]# 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共享的原因,主機被識別為路由了

解決:

//註釋掉,再重啟網路服務即可
[[email protected] ~]# vim /etc/sysconfig/network
# NETWORKING=yes
# HOSTNAME=localhost
# GATEWAY=192.168.1.1