Four network access types for virtual machines and hosts

Source: Internet
Author: User

The Virtual Machine is always in use, but the four network modes are always unclear, only know that the best choice is bridge. In order to gain a deeper understanding, I have queried some materials and summarized them as follows:

 

 



 

 

First NAT Mode

All data of the Vhost accessing the network is provided by the host, and the vhost does not exist in the network. The host and any machine on the network cannot view and access the existence of the Vhost.

Virtual machines and hosts:Virtual machines can access the host through the network, and the host cannot access the virtual machine through the network.

Virtual machines and other hosts:Virtual machines can access other hosts in the network, while other hosts cannot access virtual machines through the network.

Between virtual machines:Mutual access is not allowed. virtual machines and virtual machines are completely independent of each other and cannot access each other through the network.

The second Bridged Adapter Mode

A bridge is built through the host Nic and connected directly to the network. Therefore, it allows virtual machines to be allocated to independent IP addresses in a network. All network functions are the same as those of real machines in the network.

Virtual machines and hosts:Mutual access is allowed because the virtual machine has an independent IP address in the real network segment. The host and the virtual machine are in the same network segment and can access each other through their respective IP addresses.

Virtual machines and other hosts:Mutual access is allowed. Because the virtual machine has an independent IP address in the real network segment, the virtual machine and other hosts on the network are in the same network segment and can access each other through their respective IP addresses.

Between virtual machines:Mutual access.

Third Internal Mode

Intranet mode: The Virtual Machine is completely disconnected from the Internet, and only the internal network mode between the virtual machine and the virtual machine is realized.

Virtual machines and hosts:They cannot access each other. They do not belong to the same network and cannot access each other.

Virtual machines and other hosts:Cannot access each other.

Between virtual machines:Mutual access is allowed, provided that the two virtual machines set the same network name when setting the network.

Fourth Host-only Adapter Mode

It can be understood that the Vbox model a dedicated Nic for virtual machines in the host. All virtual machines are connected to the NIC. We can set this Nic to achieve Internet access and many other functions, such as NIC sharing and nic bridging.

Virtual machines and hosts:Mutual access is not allowed by default. Both parties do not belong to the same IP segment. The default IP segment of the host-only NIC is 192.168.56.X, And the subnet mask is 255.255.255.0. The virtual machines allocated to the backend are also located in This CIDR block. Through Nic sharing and nic bridging, virtual machines can access each other on the host.

Other VM hosts:Mutual access is not allowed by default. Mutual access can be achieved through settings.

Between virtual machines:Mutual access is allowed by default.

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.