Differences and usage of VMware virtual machine bridged, host-only, and NAT network modes

Source: Internet
Author: User
Tags virtual environment

VMware offers three modes of operation, which are bridged (bridged mode), NAT (network address translation mode), and host-only (host mode).

1 Differences between VMware virtual machine bridged, host-only, and NAT network modes 1.1 bridged (bridging mode)

In bridged mode, VMWare's virtual operating system is like a standalone host on a LAN that can access any machine in the network. In bridged mode, you need to manually configure the I P address, subnet mask for the virtual system, and the host machine in the same network segment so that the virtual system can communicate with the host machine. At the same time, because this virtual system is a separate host system in the LAN, it is possible to manually configure its TCP/IP configuration information to enable access to the Internet through a LAN gateway or router.

The relationship between a virtual system and a host machine using bridged mode is like two computers connected to the same hub. To make them communicate with each other, you need to configure the IP address and subnet mask for the virtual system, or you will not be able to communicate. If you want to use VMware to create a new virtual server in your LAN and provide network services for LAN users, you should choose BRI dged mode. This method is the simplest, directly bridge the virtual network card to the host of a physical network card, and Linux next network card binding two different address similar, in fact, the network card is set to promiscuous mode, so as to achieve the ability to listen to multiple I P. In this mode, the inside of the virtual Machine network card (for example, Linux under the eth0) directly connected to the host physical network card is located on the networks, you can imagine that the virtual machine and the host is in the same position, in the network relationship is equal, no one who behind the problem.

priority is given to the use of the bridged mode , where there are more than 1 IP addresses in the LAN that can be freely allocated. 1.2 N at (network address translation mode)

Using NAT mode, the virtual system uses the NAT (network address translation) function to access the public network through the network where the host machine resides. In other words, the use of NAT mode enables access to the Internet in virtual systems. The TCP/IP configuration information for a virtual system in NAT mode is provided by the DHCP server of the VMNET8 (NAT) virtual network and cannot be modified manually, so the virtual system cannot communicate with other real hosts on the local area network . The biggest advantage of using NAT mode is that virtual system access to the Internet is very simple, you do not need to do any other configuration, only the host machine can access the Internet; VMware's virtual DHCP server assigns an IP address to the machine inside the virtual machine.

This approach also enables two-way access to machines in the host and virtual machines. However, other machines within the network cannot access the machines in the virtual machine, and the machines in the virtual machine access other machines in the network through the host with the NAT protocol. 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. In this way the host has a virtual network card Vmnet8 (by default), where the vmnet8 is equivalent to the network card connected to the intranet, and the virtual machine itself is the equivalent of running a network of machines, the virtual Machine network card (eth0) is independent of the vmnet. You will find that in this way, VMware's own DHCP is loaded into the Vmnet8 interface by default, so that the virtual machine can use the DHCP service. More importantly, VMware comes with a NAT service that provides address translation from Vmnet8 to extranet, so this is a real NAT server running, but for virtual machines.

priority is given to using N at (network address translation mode) where only 1 IP addresses of the extranet can be used. 1.3 Host-only (Host mode)

In some special network debugging environments, it is required to isolate the real environment from the virtual environment, then you can use the host-only mode. In host-only mode, all virtual systems can communicate with each other, but virtual systems and real networks are isolated.

Note: in host-only mode, the virtual system and the host machine system can communicate with each other, which is equivalent to the two machines connected by twisted pair wires.

In host-only mode, the TCP/IP configuration information (such as IP address, gateway address, DNS server, etc.) of the virtual system is dynamically allocated by the DHCP server of the VMnet1 (host-only) virtual network. If you want to use VMware to create a virtual system that is isolated from other machines in the network, you can choose Host-only mode for some special network debugging work. Unlike NAT, the only difference is that, in this way, there is no address translation service, so, by default, the virtual machine can only be accessed by the host, which is also the meaning of the hostonly name.

By default, a DHCP service is also loaded onto Vmnet1. The virtual machine connected to the VMNET1 can still be set to DHCP, which facilitates the configuration of the system.

In the case of VMware Host only, the Guest is assigned the I P address by the DHCP server. However, on the guest machine, the IP of host cannot be ping. This looks like a NAT approach, but in this way the guest can only communicate with the host and not communicate with the local area computer unless it is forwarded or routed on the host.

priority is given to using the Host-only mode: Machines in VMware are isolated from other machines in the network. 2 Setting up machines in VMware Use these three kinds of network connection 2.1 Bridge mode

Use VMware's vmnet0 by default

The IP of the virtual machine is set to the IP address that is not used with the host network segment , the rest is the same as the host, for example, the host IP is 192.168.2.46, set the virtual machine IP to 192.168.2.254. Netmask, broadcast, gateway, DNS are all the same as the host, enabling virtual machines <-----> Host virtual machines <-----> Internet communications. 2.2 NAT Mode

Use VMware's vmnet8 by default

The default state is to use VMware's virtual DHCP to set the IP address for it. As long as the physical function is connected to the network, the virtual machine can be connected.

Manually set static IP: reference to write 2.3 host-only mode

Use VMware's vmnet1 by default

VMware's virtual DHCP is used by default to make up a virtual network isolated from the physical network, but it can communicate with the host machine.

Host-only This mode is a standalone host mode, meaning is not able to communicate with the outside world. But we can understand that this pattern uses vmnet1, which is a virtual switch. Unable to surf the internet for reasons of analysis: the virtual machine itself is based on its own DHCP assigned IP, itself and the physical machine is not within a segment.

You can set up the Internet in this way:

1, in the physical host's local connection set to the Vmnet1 share (must be vmnet1), so that the Vmnet1 connected IP and our usual physical machine shared connection is the same;

2. Manually set the IP in the same segment as the physical machine, with the same DNS resolution.

Differences and usage of VMware virtual machine bridged, host-only, and NAT network modes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.