We know that VMware is divided into several versions, the most common user is workstation, but no matter which version we use, we can find in the installation process to choose the network mode. Bridge mode is selected by default, but some users ask what other modes are used for? Sometimes when you choose another mode, you can't surf the internet. Today, Xiao-bian and everyone together to explore the VMware 3 network mode of functional and communication rules.
Let's start by talking about several VMware virtual devices
VMNET0: Virtual switches for virtual bridging networks
VMNET1: Virtual switches for Virtual host-only networks
VMNET8: Virtual switches for Virtual NAT networks
VMware Network adepter vmnet1:host Virtual network adapters for communication with host-only virtual networks
VMware Network adepter vmnet8:host Virtual network adapters for communication with NAT virtual networks
After you install the VMware virtual machine, you will have two more virtual NICs in the Network Connection dialog box, as shown in the figure:
Network Connections
I. Bridging network (bridged networking)
Bridging network refers to the local physical network card and virtual network card through the VMnet0 Virtual Switch bridge, the physical network card and the virtual network card in the topological map on the same status (virtual network card is neither Adepter VMnet1 nor Adepter VMnet8).
Bridge Network topology Map
Then the physical network card and the virtual network card is equivalent to the same network segment, the virtual switch is equivalent to a real network of switches. Therefore, the IP address of two network adapters should also be set to the same network segment.
Physical network card IP address
Virtual network card IP address
We see that the physical network card and the virtual network card IP address in the same network segment, subnet mask, gateway, DNS and other parameters are the same. Two network cards are relatively independent in the topology.
We ping192.168.15.96 on the 192.168.15.111, the result shows that two network cards can communicate with each other. If a DHCP server exists on the network, the virtual NIC can also obtain an IP address from the DHCP server. So bridging network mode is the simplest and most straightforward pattern in VMware virtual machines. It is the default option when installing virtual machines.
Two. Nat mode
In a NAT network, the VMware Network adepter VMNET8 Virtual network adapter is used, and the VMware network Adepter VMnet8 Virtual NIC on the host is directly connected to the VMNET8 virtual Switch to communicate with the virtual network card.
NAT Network mode
VMware Network adepter VMNET8 Virtual network card is limited to communication with VMNET8 network segment, it does not provide routing function to VMnet8 network segment, so virtual machine virtual a NAT server, so that the virtual network card can connect to the Internet. In this case, we can use the port mapping feature to map requests to host port 80 to the virtual machine on port 80.
The IP address of the VMware network adepter VMNET8 Virtual network adapter is generated by the system when you install VMware, and we do not modify this value, otherwise the host and the virtual machine will not be able to communicate.
Virtual network segment and NAT mode virtual network of network segment is the same, all 192.168.111.X, including the NAT server IP address is the network segment. After you install VMware, you will also generate a virtual DHCP server that assigns IP addresses to the NAT server.
The VMware network Adepter VMnet8 Virtual NIC is invoked when the host communicates with the virtual machine, because they are all in one network segment, so communication is not a problem.
In fact, the role of the VMware network adepter VMnet8 Virtual network card is to provide an interface for the communication between the host and the virtual machine, even if the host's physical network card is turned off, the virtual machine can still connect to the Internet, but the host and the virtual machine cannot exchange visits.
Three. Host-only mode
In host-only mode, the virtual network is a completely closed network, it is the only access to the host. In fact, Host-only Network and NAT network is very similar, different place is host-only network without NAT service, so the virtual network cannot connect to the Internet. Communication between the host and the virtual machine is achieved through the VMware Network adepter VMnet1 virtual network card.
Like NAT, the IP address of the VMware network adepter VMNET1 Virtual network adapter is also specified by the VMware system, while the IP address of the generated virtual DHCP server and virtual network card is located on the same network segment, but the IP address of the physical network card is not on the same network segment.
The purpose of Host-only is to establish an internal network which is isolated from the outside world to improve the security of intranet. This feature may not make much sense to average users, but large service chambers often take advantage of this feature. If you want to provide routing functionality for VMNET1 segments, you will need to use RRAS instead of XP or 2000 ICS because ICS will change the IP address in the intranet to 192.168.0.1, but the virtual machine will not assign this address to the VMNET1 virtual network card. Then there is no communication between the host and the virtual machine.
Review
In VMware's 3 network mode, NAT mode is the simplest, and basically does not need to manually configure the relevant parameters such as IP addresses. As for the bridging mode requires additional IP address, if it is in the intranet environment is also very easy, if ADSL broadband is more troublesome, ISP is generally not generous to provide a public network IP.