VMware virtual machine network configuration details

VMware Network Configuration: Introduction to Three Network Modes

After installing the virtual machine, you can see two more network cards in the network connection:

 

Among them, VMnet1 is the network interface in Host-only mode of the virtual machine, and VMnet8 is the network interface in NAT mode, which will be described in detail later. Select the virtual machine network mode as follows, click "Edit virtual machine settings", as shown in the figure:

 Then select "Ethernet" in the "Hardware" tab, and there are the following four radio options in the "Network connection" frame on the left:

 1. Bridged

 

    In bridge mode, the virtualized operating system of VMware is like an independent host in the local area network, which can access any machine in the network.

However, you need more than one IP address, and you need to manually configure the IP address, subnet mask for the virtual system, and be on the same network segment as the host machine, so that the virtual system can communicate with the host machine.   

If you want to use VMware to create a new virtual server in the LAN to provide network services for LAN users, you should choose bridge mode.

 

2. NAT (Network Address Translation Mode)

 

    Using NAT mode is to let the virtual system use the NAT (Network Address Translation) function to access the public network through the network where the host machine is located.

That is to say, using NAT mode can achieve Internet access in a virtual system.

"Ethernet adapter VMware Network Adapter VMnet8" is used to connect this machine to a virtual machine using NAT network mode,

The virtual machine created using this mode is located in the VMnet8 subnet of the virtual machine. In this subnet, VMware provides a DHCP service so that the virtual machine in the subnet can easily obtain an IP address.

Of course, you can also manually set the IP for the virtual machine in this subnet, but you must pay attention that the address should be within the network segment set by VMnet8.

At this time, the real host will act as the gateway of VMnet8, that is, the router between the virtual network VMnet8 and the real LAN to forward data between the two network segments.

The special thing about VMnet8 is that VMware enables NAT service by default for this network segment.

The biggest advantage of using NAT mode is that it is very simple for the virtual system to access the Internet. You do not need to perform any other configuration, only the host machine can access the Internet. 

    If you want to use VMware to install a new virtual system, you can directly access the Internet without any manual configuration in the virtual system, it is recommended that you use NAT mode.

 

3. Host-only (host mode)

 

   The "VMware Network Adapter VMnet1" network card is mainly used to connect the real host to the virtual machine in host-only (host mode). The virtual machine in this mode is located in the VMnet1 subnet of the VMware virtual network.

   This subnet is no different from VMnet8 (virtual subnet composed of NAT mode) except that the IP segment is different and no NAT service is provided. We can fully activate the NAT service of the VMnet1 subnet, so that VMnet1 becomes another subnet in NAT mode.

   If NAT is not activated by default, the virtual machines of this subnet will only be able to communicate with other virtual machines in the VMnet1 network and the real host, which is the origin of the "host-only" name.

 

 

 

There is basically a clear explanation of the three types of network connections commonly used in virtual machines:

Bridge Mode (Bridge Mode)

    This mode is selected by default when creating a new virtual machine. It bridges the virtual network card of the virtual host to the physical network card of a Host host.

In fact, the physical network card of the Host host is set to promiscuous mode, so as to achieve the ability to listen to multiple IPs. In this mode, the virtual network card of the virtual host is directly connected to the network where the physical network card of the Host host is located.

It can be understood that the virtual machine and the host host are in an equal position, and they are equal in terms of network relationship.

NAT mode

    In this mode, a virtual network card VMnet8 (by default) will appear in the "Network Connection" of the Host host.

If you have done the experiment of the NAT server of 2000/2003, you will understand: the VMnet8 virtual network card on the Host host is equivalent to the network card connected to the internal network,

The physical network card on the host is equivalent to the network card connected to the external network, while the virtual machine itself is equivalent to the computer running on the internal network, and the virtual network card in the virtual machine is independent of the Virtual Ethernet Switch (VMnet8).

In this way, VMware's own DHCP service will be loaded on the Virtual Ethernet Switch (VMnet8) by default, so that the virtual machine can use the DHCP service.

Host-Only Mode

   This mode is a closed way, suitable for various network experiments in a self-contained environment. In this way, a virtual network card VMnet1 (by default) appears in the "Network Connection" of the Host host.

   The only difference from NAT is that in this way, there is no address translation service. Therefore, in this case, the virtual machine can only access the host, which is also the meaning of the name of Host-Only.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326943711&siteId=291194637