VMware networking research VMware has three network modes: bridged, Nat, and host-only.
Test environment:
- OS: Vista 64 SP1
- VMware Workstation: 6.5.1
1. bridged: In this mode, the virtual network card of the VM is bridge to the physical network card of a host. In fact, the physical network card of the host is set to the hybrid mode, this allows you to listen on multiple IP addresses. In this mode, the virtual network card of the VM is directly connected to the network where the physical network card of the host is located. It can be understood that the virtual machine and the host are in the same status, the network relationship is equal. There is no distinction between the primary and the secondary networks. The limitation is that the host must connect to the network through the LAN in this mode, and it is unavailable when the NIC Mac and IP are bound. When the host network is disconnected, communication between the guest virtual machine and the host is also interrupted. 1.1 set as follows (open the application Virtual Network editor from the Start Menu ):
- When the host has multiple NICs, you can specify the bridging network adapter (2, 3). If you are not sure, select bridged to an automatically chosen adapter (1 ).
- On the tab page, When you select automatically choosen an available physical network adapter to bridge to vmnet0, VMWare automatically selects the bridging Network Adapter. The same option (1 ), in excluded adapters, you can add NICs that do not need to be used as bridging.
- The NIC setting on the guest virtual machine is the same as that on the general Nic.2. NAT: In this mode, a virtual Nic vmnet8 (default) appears in the "Network Connection" of the host ). The vmnet8 virtual Nic on the host is equivalent to the NIC connected to the Intranet, the physical Nic on the host is equivalent to the NIC connected to the Internet, and the virtual machine itself is equivalent to a computer running on the Intranet, the virtual Nic In the virtual machine is independent of the virtual ethernet switch (vmnet8 ). In this way, the DHCP service provided by VMware is loaded to the virtual ethernet switch (vmnet8) by default, so that the virtual machine can use the DHCP service. More importantly, VMWare comes with the NAT service, which provides address translation from the vmnet8 virtual network card of the host to the Internet. This mode is the most powerful and flexible configuration. 1.1. The settings are as follows:
- Click (1) and select subnet... (2), set the subnet CIDR block; select DHCP... (3) set DHCP. Select Nat... (4) set Nat.
- Set Nat. In (1) set the address of the Gateway (that is, Nat). click the button of portable forwading... (2). the dialog box (3) is displayed, and address translation can be set.
- The NIC setting on the guest virtual machine is the same as that on the general Nic. The fixed IP address must be set in the above network segment, and the gateway and DNS must be the gateway IP address set in the previous step.
3. Host-only: This mode is closed and suitable for various network experiments in an independent environment. In this way, a virtual Nic vmnet1 (default) appears in the "Network Connection" of the host ). The only difference from Nat is that there is no address translation service in this mode. In this case, the virtual machine can only access the host, which is also the name of host-only. By default, a DHCP service is loaded to virtual ethernet switch (vmnet1. In this way, the virtual machine connected to the virtual ethernet switch (vmnet1) can still be set to DHCP. In the Windows operating system, this mode allows Internet connection and shared access to the network. However, I think it is not as convenient as Nat, and it is unnecessary. 3.1. The settings are as follows:
- Click (1), select subnet... (2), set the subnet CIDR Block, select DHCP... (3), and set DHCP.
- The NIC setting on the guest virtual machine is the same as that on the general Nic. The fixed IP address must be set within the network segment set above. The Gateway and DNS can be set to the IP address of vmnet1.