2019独角兽企业重金招聘Python工程师标准>>>
配置
- 主机 win 7
- 虚拟机 VMware
- 客户机 Ubuntu 12.04
- Ubuntu有两个网卡:eth0为NAT, eth2为bridge
现象
-
Ubuntu能与局域网中其它机子互
ping
(通过eth2
) -
Ubuntu能上外网 (通过
eth0
),比如使用w3m
打开网页 -
Ubuntu却
ping
不通外网 (理论上应该是可以通过eth0
ping
出去的), 从下面的结果可以看出,其实已经可以通过eth0
接口联到外网解析出baidu.com
的ip
了,只是ping
报文收不到。honghe@ubuntu20143-s:~$ ping baidu.com -I eth0 PING baidu.com (123.125.114.144) from 192.168.133.128 eth0: 56(84) bytes of data. ^C --- baidu.com ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2021ms
如果是没有正常联网,是直接返回
Destination Host Unreachable
honghe@ubuntu20143-s:~$ ping 8.8.8.8 -I eth2 PING 8.8.8.8 (8.8.8.8) from 192.168.133.128 eth2: 56(84) bytes of data. From 10.192.5.252 icmp_seq=1 Destination Host Unreachable From 10.192.5.252 icmp_seq=2 Destination Host Unreachable From 10.192.5.252 icmp_seq=3 Destination Host Unreachable ^C --- 8.8.8.8 ping statistics --- 5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4032ms
解决方法
当然是把网卡共享关闭就OK。
产生原因
host机win 7上最近插了个360随身wifi (非广告), 这玩意默认给我打开网卡共享来产生wifi热点。
解释
暂时不知如何解释,望高手留言 ;)