因此,在過去一天與VMWare網絡巨人戰鬥後,我決定放棄並尋求幫助。我在VMWare Workstation 8.0.2 build-591240上使用NAT在Windows 7上運行CentOS 6映像,出於某種原因,我無法再使用靜態IP地址連接到Internet。這似乎只適用於靜態的,而不是DHCP,它告訴我它是:我的Windows 7操作系統上的某些程序阻止了該IP地址的連接,或者在CentOS映像上發生了我的配置中出現的奇怪現象。無法將CentOS虛擬機連接到互聯網(NAT連接)
我不知道如果這是由於yum更新,所以我嘗試重新安裝VMWare工具。這似乎並沒有解決這個問題。我也試過如下:
- 確信的的VMnet連接被連接(愚蠢的,但不得不檢查......我也可以連接到使用DHCP的網絡)
- 確信我的防火牆在Windows允許VMware連接到互聯網
- 我已經看到/讀到Windows有時會阻止ping請求,所以我嘗試去Firefox的www.google.com,這有一個「服務器未找到響應」...所以我必須爲DNS做一些不同的事情嗎?
- 我檢查我的Windows機器的註冊表中,我只有一個默認網關
1項就像我說的,這似乎發生出藍色。該圖像可以在沒有問題之前連接到互聯網。有誰知道可能會導致此問題的CentOS更新?我已經添加了我的配置如下,以節省一些調試周期:
[[email protected] ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:A0:51:BD
inet addr:192.168.88.128 Bcast:192.168.88.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:683 errors:0 dropped:0 overruns:0 frame:0
TX packets:67 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:64242 (62.7 KiB) TX bytes:8055 (7.8 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1049 errors:0 dropped:0 overruns:0 frame:0
TX packets:1049 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:68417 (66.8 KiB) TX bytes:68417 (66.8 KiB)
[[email protected] ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
IPV6INIT="no"
NM_CONTROLLED="no"
ONBOOT="yes"
IPADDR=192.168.88.128
NETMASK=255.255.255.0
GATEWAY=192.168.88.2
TYPE="Ethernet"
[[email protected] ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=MyCentOS
GATEWAY=192.168.88.2
[[email protected] ~]# service iptables status
iptables: Firewall is not running.
[[email protected] ~]# service ip6tables status
ip6tables: Firewall is not running.
[[email protected] ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[[email protected] ~]# ping 192.168.88.2
PING 192.168.88.2 (192.168.88.2) 56(84) bytes of data.
64 bytes from 192.168.88.2: icmp_seq=1 ttl=128 time=0.391 ms
64 bytes from 192.168.88.2: icmp_seq=2 ttl=128 time=0.271 ms
^C
--- 192.168.88.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1349ms
rtt min/avg/max/mdev = 0.271/0.331/0.391/0.060 ms
[[email protected] ~]# ping www.google.com
ping: unknown host www.google.com
[[email protected] ~]# uname -a
Linux MyCentOS 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[[email protected] ~]# vmware-toolbox-cmd -v
8.8.2.10499 (build-590212)
我測試了在靜態配置中將IP地址更改爲192.168.88.131(在此地址使用DHCP)。這似乎解決了這個問題...將調查其他人的未來參考,看看有什麼阻止xxx.xxx.xxx.128 .. – gordysc