Comparison of Host-only, NAT, and bridge in VMware

Source: Internet
Author: User
Tags virtual environment

VMware has host-only (host mode), NAT (network address translation mode), and bridged (bridge mode) three modes of operation.

1.bridged (bridging mode)

In such a mode. VMware's virtual operating system is like a standalone host on a local area network that can access any machine in the network.

In bridging mode, you need to manually configure the virtual system with an IP address, subnet mask, and the same network segment as the host machine, so that the virtual system talent communicates 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 using bridged mode and a host machine. It's like two computers connected to the same hub. Want them to communicate with each other. You will need to configure the IP address and subnet mask for the virtual system, or you will not be able to communicate.

2.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 are capable of communicating with each other. But the virtual system and the real network 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 virtual system's TCP/IP configuration information (such as IP address, gateway address, dnsserver, and so on). are dynamically allocated by the dhcpserver of the VMnet1 (host-only) virtual network.

Suppose you want to use VMware to create a virtual system that is isolated from other machines in the network, perform some special network debugging work, and be able to choose Host-only mode.

3.NAT (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, using NAT mode can be used to access the Internet in virtual systems today. The TCP/IP configuration information for a virtual system in NAT mode is provided by the dhcpserver of the VMnet8 (NAT) virtual network and cannot be changed manually. Therefore, the virtual system will not be able to communicate with other real hosts in this LAN. The biggest advantage of using NAT mode is that virtual system access to the Internet is easy. You don't need to do any other configuration, just the host machine can access the Internet.

Suppose you want to use VMware to install a new virtual system, you can access the Internet directly from the virtual system without any manual configuration, we recommend that you use NAT mode.

Hint: The above mentioned NAT mode VMnet8 virtual network, VMNET1 virtual network in host-only mode, and VMnet0 virtual network in bridged mode are all generated by the VMware virtual machine's own active configuration and do not need to be set by the user.

VMnet8 and VMNET1 provide DHCP services, and VMNET0 virtual networks are not available.

This question has not been thoroughly understood, in the mind is not very often the number. What bridge in VMware, Nat, hostonly or something. There are also network problems in the colinux.

In short, very complicated, it is very necessary to understand.

1.vmware network connections

After you install the virtual machine. Two virtual network cards are installed by default. VMnet1 and VMnet8, others are not installed (but can also be installed manually).

The VMNET1 is the host network card, which is used to connect to the network in host mode.

The VMNET8 is a NAT network card. Used to connect to a network in a NAT manner. Their IP addresses are randomly generated, assuming that you want to do experiments with virtual machines. It is best to get rid of the IP address of VMnet1 to VMnet8. It is customary to "pin" the network segment used by the VMware Virtual network card. Use such as the following principle: VMnet1 the corresponding network segment is 192.168.10.0,vmnet2 corresponding network segment is 192.168.20.0, other similar.

Of course, the usual is just the use of the use of no change. You can surf the Internet.

The main ways of network connection are: Bridged (bridge), NAT, host network.

use bridged networking (using bridged network)

Description: Use the VMnet0 Virtual switch. At this point the virtual machine is quite the same as a stand-alone computer on the network and hosts a separate IP address.

With bridging, a,a1,a2,b can access each other.

Use network address translation (NAT)

Description: Use the Vmnet8 Virtual switch. At this point the virtual machine can pass through other workstations on the host one-way network, and other workstations cannot access the virtual machine.

Use NAT mode. A1,A2 can access B, but B cannot access a1,a2. But A,A1,A2 can visit each other.

use Host-only Networking (using Host network)

Description: Use the VMNET1 Virtual switch. At this point, the virtual machine can only be connected with the virtual machine, host. Which means you can't be on the internet

Using the host method, A,A1,A2 can access each other, but A1. A2 can't access B. Nor can I be interviewed by B.

Practical application: Broadband is most commonly used today. Use bridge mode. The host must be able to surf the internet, but the operating system on the virtual machine is not able to surf the Internet.

At this point your host is equivalent to a, and the virtual machine is equivalent to A1. Unless you apply for an IP address to a carrier (such as telecom, Netcom), it is obviously undesirable. Let's say you have a router. Then you can use the bridge mode to surf the Internet, because the IP address you are applying for is written on the router, not on your machine. This includes your host, the virtual machine, and the machines that are connected to other people on the router, all of which will be able to surf the Internet, using the IP address assigned by the router itself, which is usually 192.168.0.XXX. It seems that the operator is not happy to use your router. Say what is damaging to the interface of their switch. Of course, just want your host to be able to surf the Internet, using the NAT method, the virtual machine will always be able to surf the internet (of course not included in your random rewrite IP. Information such as gateways, DNS, etc.).

Instance Manual setting: If the host's VMnet1 uses a network segment address of 192.168.10.0. VMnet8 uses a network segment address of 192.168.80.0, the gateway address is 192.168.80.254 (that is, the NAT router address, you can set it yourself.) On VMnet8), the host network card uses the address of 192.168.1.1.

One, the use of bridge, virtual machine A1 IP address can be set to 192.168.1.5 (with the host network card address same network segment can). Other such as gateway address, DNS, subnet mask are the same as the host.

Second, the use of NAT, the virtual machine A1 IP address can be set to 192.168.80.5 (and VMNET8 use the same network segment), the gateway is the NAT router address, that is 192.168.80.524

Third, the use of Host-only mode, the virtual machine A1 IP address can be set to 192.168.10.5 (with the same network segment VMNET1)

Comparison of Host-only, NAT, bridge in VMware

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.