Online see a lot of VMware Workstation three ways to surf the internet, are very much the same, said is not clear, but according to do can achieve the Internet demand. Don't say much nonsense, write!!
A. VM Virtual machine NAT way to the Internet.
After the VM software is installed on Windows7, there are 5 services installed at the same time: Take a look at what these 5 services do
First service: Authorization and Authentication Service for starting and accessing virtual. Authorization and authentication services for starting and accessing the virtual. Simply put, when your operating system needs to run in the background, you need to start the service.
Second service: DHCP service for virtual networks. Simply put is an IP auto-allocation service. In the 7-tier (5-tier) architecture of the network, there is a DHCP protocol that implements that protocol.
Third service: Network address translation for virtual networks. I call him NAT service, in order to solve the shortage of IPv4 address, the foreigner made a NAT protocol, that is, the private network IP map to the public network IP.
Fourth service: Arbitration and enumeration of USB devices for virtual machines. Virtual machines and USB devices enumerate the quorum, this literal meaning.
Fifth service: Remote Access Service for registration and management of virtual machines. The registration and management of the VM.
--------------------------------------------------------------------------------------------------------------- ------------------------------------------------------
Well, the above complex English translation, thanks to PowerWord strong translation ability!!!
--------------------------------------------------------------------------------------------------------------- ------------------------------------------------------
To start the configuration, the idea is to start with the physical host network card and configure the virtual machine's operating system.
1. Open: Control Panel \ Network and internet\ network connection Configure the local host's NIC: share the local attached network card to the VMNET8 network card (if there are only 2 network cards, do not choose to share to that network card, if more than 2 network cards, to select, Which NIC to share the local connection to) Here I have three NICs
2. Configure the VMNET8 network card IP, subnet mask, and so on. IP, subnet mask, gateway look like your own, DNS address to see the address of the physical host, either manually configured, or automatically obtained;
PS: View DNS address, WIN7 command line: Ipconfig-all
3. Open the VMware Edit virtual machine settings and select Custom Nat mode (VMNAT8).
4. Edit the Virtual network Editor, where the configuration is important. There is no option to assign IP addresses to virtual machines using the local DHCP service, and if you choose then the second DHCP service in the Win7 VM service will be turned on, assigning an IP to the operating system NIC on the virtual machine, and the NIC being set to dynamically obtain the IP. (a service is occupied by resources Ah, can we not? 0.0) After the configuration is complete, check the configuration again, especially the service NAT service must be open.
5. The external environment of the virtual machine operating system is configured to complete, boot, configure the internal Internet environment.
Root Authority command: vi/etc/sysconfig/network-scripts/ifcfg-eno16777736
The main configuration is static access to the IP, gateway, subnet mask, etc., the CENTOS7 network card is turned off by default, need to be turned on (or set to boot), and then start the Network device (service network restart
) or restart the system (reboot).
6. Baidu a bit
7. Take a look at the startup of the service, because it is NAT mode to configure IP manually, so only one service is started.
---------------------------------------------------------------------------------Configuration Complete------------------------------------ -----------------------------------------
VMware Workstation Mount CentOS7 virtual machine nat mode online