VMware connects physical machines and virtual machines through virtual networks, or virtual switches, to achieve data transmission of virtual machines. After installing VMware, my computer (also known as the physical machine and the host machine) has three virtual network cards. Check the paths: control panel network and Internet network connection. These are VMnet0 (Host Only), VMnet1, and VMnet8, respectively. The corresponding network types are respectively bridge mode, host mode, and NAT mode, which are three different virtual networks. Of course, you can also create a new virtual network card on the physical machine, or modify the existing virtual network card type for flexible configuration.
First, let’s look at the bridging mode. The official explanation is: connect the virtual machine directly to the external network, and then look at the network configuration on VMware. The viewing path is: Edit – Virtual Network Editor – Change Settings to view the detailed configuration of the bridging mode.
Bridge mode, using VMnet0 to connect to the network of the physical machine. Click the “Automatic Setting” button and check the corresponding physical machine network card. My computer is now using a wireless network card (physical network card) to access the Internet, so I chose the bridge wireless network card.
The virtual machine connects VMnet0 virtual switch, the virtual switch and the network card of the physical machine are bridged, and the network of the physical network card is shared, so that the virtual machine can access the external network. The virtual machine and physical machine are in the same network, and the IP address of the virtual machine is also assigned by the DHCP server in the same network segment.
Let’s take a look at NAT mode first, because the host mode is a reduced version of NAT mode. Understanding the NAT mode means understanding the host mode. The official interpretation of NAT mode is: share the IP address of the host with the virtual machine. Take a look at the detailed configuration of NAT mode. The viewing path is: Edit – Virtual Network Editor – Change Settings. In NAT mode, you can configure multiple parameters, such as NAT configuration and DHCP configuration.
First, the VMnet8 network card of the physical machine is connected to the VMnet8 virtual switch. The DHCP server automatically assigns the IP address of the 192.168.5.0/24 network segment to the virtual machine to realize the network interconnection between the physical machine, the virtual machine, and the virtual machine, but it cannot access the external network. Then check the other link. The physical network card is connected to the NAT device to realize the NAT function. Through the default configuration, it can be found that the gateway address of the VMnet8 network is 192.168.5.2, that is, the NAT device. Through the NAT link, the 192.168.5.0/24 network segment can be converted to 192.168.0.100 to access the external network.
Compared with the bridge mode, the NAT mode isolates the virtual network from the physical machine network and improves the security; NAT mode uses a custom network segment, which does not consume the IP address resources of the physical network, and its scalability is enhanced; In NAT mode, you need to do NAT mapping to access the virtual machine. The configuration becomes complex, which is not conducive to management and operation and maintenance.
The official explanation of the host mode is: connect virtual machines in the private network. The private network here refers to the private network, also known as the local area network. The physical machine is connected to the virtual network of the host mode through the VMnet1 network card to realize the interconnection between the physical machine and the virtual machine, but cannot access the external network. The network topology of the host mode is very simple, that is, NAT mode reduces NAT devices. It can also be found on the configuration page that compared with NAT mode, NAT configuration items are missing.
The network between the network cards on the physical machine is isolated from each other. If you want to communicate with the corresponding network card or network, you must configure the address of the same network segment to communicate. For DHCP configuration, you can also modify the address pool configuration according to the actual situation. You can also turn off the DHCP function and use static configuration.
To protect your virtual machine data, Vinchin offers solutions such as VMware backup for the world’s most popular virtual environments, XenServer backup, XCP-ng backup, Hyper-V backup, RHV/oVirt backup, Oracle backup, etc.