After the virtual machine is installed, two virtual network cards, VMnet1 and VMnet8, are installed by default, others are not installed (you can, of course, install the others manually). Where VMnet1 is the host network card for the host network connection. The VMNET8 is a NAT network card that is used for NAT connection. Their IP address is randomly generated, if you want to use a virtual machine to do experiments, it is best to VMnet1 to VMnet8 IP address to get rid of. The network segment used by the VMware Virtual network card is "fixed", using the following principle: VMnet1 corresponding network segment is 192.168.10.0,vmnet2 corresponding network segment is 192.168.20.0, other similar. Of course, usually just use the use of no change, you can surf the internet on the line.
The main ways of VMware network connectivity are: bridging (bridged), NAT, Host Network (HOST-ONLY).
1. Use bridged networking (using bridged network)
Description: Using the VMnet0 Virtual Switch, the virtual machine is quite the same as a standalone computer on the network and host, with a separate IP address, its network topology 1, using the bridge mode, A,a1,a2,b can exchange visits.
Figure 1 Bridge mode topology schematic
2. Use network address translation (NAT)
Description: When using the Vmnet8 Virtual Switch, the virtual machine can be accessed through other workstations on the host one-way network, and other workstations cannot access the virtual machine. As shown in network Topology 2, with NAT, A1,A2 can access B, but B can not access A1,A2. But A,A1,A2 can exchange visits.
Figure 2 NAT mode topology schematic
3. Use Host-only Networking (using Host network)
Description: Using the VMNET1 Virtual Switch, the virtual machine can only exchange visits with virtual machines and hosts. That is, not on the Internet, its network topology 3, the use of host mode, A,A1,A2 can exchange visits, but A1,A2 cannot access B, nor can be accessed by B.
Figure 3 Host network topology diagram practical application: Now the most commonly used is broadband, using bridge, the host must be able to surf the internet, but the operating system on the virtual machine is not allowed to surf the internet. At this point your host is equivalent to a, and the virtual machine is equivalent to A1, unless you re-apply to the operator (such as telecom, Netcom) IP address, obviously this is not advisable. If you have a router, then you can use the bridge mode to surf the Internet, because at this time you apply for the IP address is written on the router, rather than on your machine, such as your host, virtual machines, including the other people on the router's machine, will be able to surf the internet, using the router automatically assigned IP address, The IP address is typically 192.168.0.XXX. It seems that operators are not happy with the way you use routers, saying what is damaging to their switch interfaces. Of course, as long as your host can access the Internet, using NAT, the virtual machine can always surf the internet (of course, not included in your random rewriting of IP, gateway, DNS and other information). Instance Manual setting: Assume that the host's VMnet1 uses a network segment address of 192.168.10.0,vmnet8 with a network segment address of 192.168.80.0, the gateway address is 192.168.80.254 (that is, the NAT router address, can set itself, on VMnet8), the host network card using the address for 192.168.1.1. One, the use of bridge mode, the virtual machine A1 IP address can be set to 192.168.1.5 (with the host network card address same network segment), and other such as gateway address, DNS, subnet mask is the same as the host. Second, the use of NAT, the virtual machine A1 IP address can be set to 192.168.80.5 (and VMNET8 use the same network segment), the gateway is the NAT router address, that is, 192.168.80.524 three, the use of host-only mode, The IP address of the virtual machine A1 can be set to 192.168.10.5 (same network segment as VMNET1) Description: General users do not need to manually set their own, choose to automatically get, or turn on the DHCP service.
Three network configuration bridging, Nat and host-only in VMware workstation environments