Today, I tested the VM settings for accessing the Internet through the host. The record is as follows:
I. test environment:
1. HOST: Windows XP SP4
2. Virtual Machine: centos (RedHat Linux) 4.4
3. Virtual Machine: VMWare 6.0
Ii. Test process:
1. Network Mode (NAT shared Host IP address)
2. VMWare settings (Dhcp Service enabled)
In the "edit" menu of VMware, "virtual network settings ......" Open the following window
From the above, we can see that the vm dhcp service has been enabled. The default network segment is 192.168.203.0.
3. Virtual Nic settings
There is a virtual network card vmnet8 in the network connection of the host. First check whether the connection is normal, and then check whether the IP address is automatically obtained. If not, change it to automatically obtained.
4. network settings in Linux
After entering Linux, use the command VI/etc/sysconfig/network_script/ifcfg-eth0 to view and edit the NIC configuration, as shown below:
The bootproto of is already equal to DHCP. If the IP address is previously specified, you can change it to the above style.
5. automatically obtain the IP address
After Linux is restarted, use ifconfig to view the IP address and find that the IP address is not obtained. Then use the dhclient command to obtain the IP address again, for example:
6. Ping the IP address of the host. Open the browser and enter the URL to access the Internet.