Yesterday wrote an article summarizing the previous two days tossing the CentOS Internet in VMware 10 problem, leaving a small flaw, is the video tutorial in the use of NAT mode to configure the virtual machine with a shared network card. Today, on the basis of yesterday, we finally figured out the problem.
This problem boils down to the VMware 10 network setup. First or in the Windows7 "network"--"Change adapter Settings" to share the network card to Vmnet8, will be a prompt box, note the IP that appears inside, I this is 192.168.137.1, and then open the vmnet that NIC IPv4 settings, such as, where the IP, subnet mask, the default gateway all do not change, just fill in the preferred DNS of the current network operator provides DNS, I am here to fill in the DNS of China Telecom
Then open VMware, in the "Virtual network editor" Check Vmnet8, and then the key is that the "Use the local DHCP service to assign IP address to the virtual machine" option to remove the checkmark, and then it is important!
High energy ahead!
High energy ahead!
High energy ahead!
Important thing to say three times!
At this point you must first click "Application" below!
Then you can modify the following "Subnet IP" and "Default gateway" (the default gateway generally does not change, mainly the subnet IP, to be modified to the first three digits of the IP address appearing in the Prompt box, the last one changed to 0, in my case is 192.168.137.0)
As shown
Then click "Apply", I am here because of the time and did not modify the subnet IP so "apply" this button is gray, but if you modify the subnet IP after this button can be selected state.
Then point to the NAT setting on the right, set the first three bits of the gateway to the first three digits of the IP that appears in the prompt box, and the last one to 2, and I'm 192.168.137.2, as
Then all the way "OK", save it.
The next step is to go to CentOS and modify the Linux network parameters. Here My network parameter is ipaddr=192.168.137.3,netmask=255.255.255.0,gateway=192.168.137.2, then nameserver 192.168.137.2
In fact, the key is ipaddr to be set to a network card with VMNET8 IP for the same network segment of the different IP, that is, only modify the last one, Netmask has always been 255.255.255.0,gateway and nameserver. It is important to set the gateway IP in the "Vmnet settings" of the "Vmnet8" of VMware's "Virtual Network Editor", which is critical, I was planted here two days ago.
Here is my Linux network configuration
After the configuration is complete save and exit, then service network restart, then found ping 192.168.137.2, found OK, in Windows7 cmd ping 192.168.137.3, that is, Ping Linux IP , the discovery is OK. This is done.
Configure the Internet functionality of CentOS in VMware using the NAT mode of the shared NIC