I. Bridged mode:
Change the Internet access method to bridge
#1. Modify/etc/sysconfig/network-scripts/ifcfg-eth0:
#2. Modify/etc/resolv. conf
In fact, this configuration file can also be modified without being changed. Using bridged will automatically detect the configuration file.
#3. test:
Ii. nat Mode
Change the Internet access mode to nat mode and share the IP address with the host.
#1 set the IP address of VMware Virtual Ethernet Adapter for VMnet8 (Control Panel \ network and Internet \ Network Connection) as follows, and DNS does not need to be set:
#2. Modify/etc/sysconfig/network-scripts/ifcfg-eth0:, as shown below
How to set the gateway here:
Choose VMware Edit> Virtual Network Editor> VMnet8> NAT Settings, as shown below:
#3. Add DNS domain name resolution
Vi/etc/resolv. conf. My settings are as follows:
How to Set nameserver see: http://blog.csdn.net/yueguanghaidao/article/details/7038864
#4. Test
Iii. hostonly
Change the Internet access mode to hostonly
To enable the hostonly mode to connect to the Internet, you must use network sharing.
#1. Enable network sharing
Here I use the network sharing of local connections (or other networks, such as wireless networks)
Open Control Panel \ network and Internet \ Network Connection
Local Connection-> properties-> share, select VMnet1 for network connection, as shown below
Click OK. The following prompt is displayed:
If connection sharing is enabled, the IP address of Vmnet1 will change to 192.168.137.1.
Click OK. The problem is as follows:
In this case, because a service is not enabled, open the Service (enter services. msc in the running process)
Find Windows Firewall and right-click Start, as shown below:
Then, perform the preceding operation again. After the operation is complete, check whether the IP address of vmnet1 is 192.168.137.1?
#2 .. Modify/etc/sysconfig/network-scripts/ifcfg-eth0:
Note: The Gateway is the IP address of vmnet1.
#3. Add DNS domain name resolution
Vi/etc/resolv. conf. My settings are as follows:
Nameserver will not talk about it again.
#4. Test
All three Internet access methods have been completed successfully.
From yihaibobb's column