Detailed description of VMware virtual network connection modes (NAT, Bridged, Host-only) and bridgedhost-only

Source: Internet
Author: User

Detailed description of VMware virtual network connection modes (NAT, Bridged, Host-only) and bridgedhost-only
Preface

If you use VMware to install a virtual machine, you will definitely choose a network connection. vmware provides three main network connection methods. What should we choose? What are their differences? In this article, we will go into depth.

First, open the network adapter in the virtual machine settings, such:

 

There are three types of network connections (from Chinese to English): NAT, Bridged Adapter, and Host-only Adapter.

These three modes determine whether your virtual machine can communicate with each other, and whether the virtual machine can communicate with the host. At the same time, the short board of ip4.

How vmnet0, vmnet1, and vmnet8 operate

After the virtual machine is installed, the following will appear in your host:

Vmnet0: virtual bridge. This bridge has several ports. One port connects to your host and one port connects to virtual machines. Their locations are equal and no one is the gateway, therefore, the bridge mode allows the virtual machine and the host to have the same network location, in a unified network segment.

Vmnet1: it builds a closed network environment and does not establish a connection with a network environment other than the host. It is also a virtual switch. One port is connected to the host, and the other port is connected to the DHCP server of the virtual machine, other ports are attached to the VM.

Vmnet8: Used in NAT connection mode. Connect to the vmnet8 switch from the VM's virtual Nic. The other ports of the vswitch are connected to the NAT device, the other interfaces are connected to the DHCP server, and the other interfaces are connected to the virtual machine.

NAT, Bridged Adapter, and Host-only Adapter Connection Methods

Speaking of practice, I will first build a simple lab environment, as shown below:

Figure: five virtual machines (A, B, C, D, E) are installed on the host. The host and other hosts can ping each other 150.

Next, ping each other to check the network connections in various modes, as shown in the following table:

Here is only a part of the connection experiment, and there is no connection practice with virtual machines on other hosts, so we will explain through the following three connection modes, to understand what the virtual machine connection with other hosts will look like.

Before talking about these three types, Let me give an example to illustrate these three network connection types, so that you can understand them as follows:

  • NAT: The most common thing is that if you are going to eat spicy food and there is wifi in the store, you may all share an Internet IP address and can access the Internet.
  • Bridged: from the table above, we can see that he and the host are in a network segment and have their own independent ip address, which is equivalent to a single host and at the same level as the host, it is equivalent to one of the two hot ones.
  • Host-Only, this mode is not commonly used because the boss is unwilling to do it.
Network Address Translation (NAT)

First, let's take a look at how NAT works.

The following conclusions can be drawn from the figure.

NAT is used to convert private addresses of the Intranet into common addresses so that the internal network can access the external network.

NAT advantages:

What are the disadvantages of NAT?

To demonstrate how NAT works

 

The implementation of NAT technology is divided into the following three types:

Static NAT: one-to-one transfer of Intranet ip addresses to Internet ip addresses to hide Intranet ip addresses, but it cannot alleviate the problem of fewer ip addresses. It is also a commonly used mode, which is generally used for E-mail, FTP, and web servers in the intranet.

Dynamic NAT: form an available NAT pool with valid Internet addresses. When an intranet ip address needs to access the Internet, obtain an available Internet ip address from the NAT pool, the difference between static NAT and dynamic NAT is that the address translation is temporary. After the communication ends, the Internet ip address is released and can be used by other internal ip addresses.

PAT (port address translation): maps multiple IP addresses in the Intranet to the same IP address and different ports on the Internet. The premise of PAT is Data Transmission Based on TCP or UDP.

Bridged bridging mode and Hostg-only

In the bridging mode, vmnet0 is used. It allows virtual machines and hosts to share the same network position, in the same network segment. That is to say, the host can be connected to the network, just like him.

Host-only: vmnet1 is used. The communication mode is that the virtual machine can only communicate with other virtual machines in this mode between the host and the host. It cannot establish communication with networks other than hosts and is used to establish an isolated network environment.

After introducing the virtual network card, I suddenly feel that there is nothing to talk about here. But here, I believe you have a deep understanding of these three network connection modes, I also know his application scenarios. I think that's enough.

In the end, we can't communicate with each other in these three modes. I feel like there is something in your mind.

Summary

The following is your favorite summary, which includes three parts:

1. I hope to keep an eye on my other articles.

2. Are there any clear instructions in the blog, or you have a better way? Join the two chat groups in the upper left corner to study and discuss them together.

3. You can forget to pay attention to likes, but never forget to scan the QR code to enjoy them.

Related Article

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.