can';从centos虚拟机ping谷歌

can';从centos虚拟机ping谷歌,centos,virtual-machine,Centos,Virtual Machine,最近在我的windows 7主机中安装了centos虚拟机(vm player) 我可以从内部网络ping我的虚拟机,没有任何问题 我还可以从我的虚拟机访问内部网络,而不会出现问题 但我的虚拟机不能访问互联网,我不能ping谷歌或任何其他外部网络 我尝试了几种解决方案,花了一个多星期的时间试图找出问题所在 配置: 我的虚拟机已桥接并在DHCP模式下工作: [root@localhost~]#ifconfig eth0 Link encap:Ethernet HWaddr 00

最近在我的windows 7主机中安装了centos虚拟机(vm player)

  • 我可以从内部网络ping我的虚拟机,没有任何问题
  • 我还可以从我的虚拟机访问内部网络,而不会出现问题
  • 但我的虚拟机不能访问互联网,我不能ping谷歌或任何其他外部网络
我尝试了几种解决方案,花了一个多星期的时间试图找出问题所在

配置:

  • 我的虚拟机已桥接并在DHCP模式下工作:
[root@localhost~]#ifconfig

eth0      Link encap:Ethernet  HWaddr 00:0C:29:2F:D7:52  
          inet addr:**172.31.44.128**  Bcast:172.31.47.255  Mask:255.255.248.0
          inet6 addr: fe80::20c:29ff:fe2f:d752/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15535 errors:0 dropped:0 overruns:0 frame:0
          TX packets:503 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1099726 (1.0 MiB)  TX bytes:38953 (38.0 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:36 errors:0 dropped:0 overruns:0 frame:0
          TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:4098 (4.0 KiB)  TX bytes:4098 (4.0 KiB)
[root@localhost~]#更多/etc/sysconfig/network

NETWORKING=yes

NETWORKING_IPV6=yes

HOSTNAME=localhost.localdomain
[root@localhost~]#**

[root@localhost~]#**

[root@localhost~]#

我可以ping我的网关,也可以ping我的DNS和代理:

[root@localhost~]#

网络接口已启动并正在运行:

[root@localhost ~]# service network status
Configured devices:
lo eth0
Currently active devices:
lo eth0
防火墙已停止:

[root@localhost ~]# service iptables status
Firewall is stopped.
[root@localhost ~]# service ip6tables status
Firewall is stopped.
还有什么?我也可以

但我无法连接到互联网


提前感谢您的帮助。

尝试ping到您的名称服务器ip地址,并尝试ping到您的网关地址。禁用搜索。。。在resolv.conf中输入行

**netstat -rn**

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
172.31.40.0     0.0.0.0         255.255.248.0   U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
0.0.0.0         172.31.40.1     0.0.0.0         UG        0 0          0 eth0
ping 172.31.40.1

PING 172.31.40.1 (172.31.40.1) 56(84) bytes of data.
64 bytes from 172.31.40.1: icmp_seq=1 ttl=255 time=11.9 ms
64 bytes from 172.31.40.1: icmp_seq=2 ttl=255 time=1.18 ms

[root@localhost ~]# ping 172.31.41.2

PING 172.31.41.2 (172.31.41.2) 56(84) bytes of data.
64 bytes from 172.31.41.2: icmp_seq=1 ttl=128 time=1.75 ms
64 bytes from 172.31.41.2: icmp_seq=2 ttl=128 time=0.520 ms
64 bytes from 172.31.41.2: icmp_seq=3 ttl=128 time=0.580 ms

[root@localhost ~]# ping ptx.proxy.corp.company

PING lmarcproxy100.ptx.fr.company (10.7.80.40) 56(84) bytes of data.
64 bytes from lmarcproxy100.ptx.fr.company (10.7.80.40): icmp_seq=1 ttl=246 time=40.2 ms
64 bytes from lmarcproxy100.ptx.fr.company (10.7.80.40): icmp_seq=2 ttl=246 time=40.1 ms
64 bytes from lmarcproxy100.ptx.fr.company (10.7.80.40): icmp_seq=3 ttl=246 time=40.2 ms
64 bytes from lmarcproxy100.ptx.fr.company (10.7.80.40): icmp_seq=4 ttl=246 time=40.2 ms
[root@localhost ~]# service network status
Configured devices:
lo eth0
Currently active devices:
lo eth0
[root@localhost ~]# service iptables status
Firewall is stopped.
[root@localhost ~]# service ip6tables status
Firewall is stopped.