VirtualBox Virtual Machine Network setting principle analysis _virtualbox

Source: Internet
Author: User

These days in the virtual machine to study the operating system (OS) properties of the problem, as we all know, the most cost-effective, cheapest way is to set up a virtual machine. This time I installed on my personal computer CentOS, LinuxMint, WINDOWS8 operating system, the system is installed, but encountered a problem, virtual machine and physical machine network interconnection, and virtual machine network access problem has not been resolved.

These days patiently through the Niang, looking for some information, through observation, gradually understand the VirtualBox network setup problem, well, nonsense not to say, first of all, introduce the virtual machine of several network connection methods.

First Type: Not attached

As the name implies is not set up a network connection, that is, the virtual host is not on any network, the host can not access the virtual host, the virtual host can not access the host.

The second type: NAT (network address translation)

The network address translation mode, which is the simplest network connection mode of the virtual machine, the network connection of this way basically does not have any network setting on host host and virtual host, that is the reason, this way is also virtualbox default network connection setting. The virtual host uses NAT to connect the network, at this time the VirtualBox quite act as a router, connect the virtual host and host host.

On the one hand, the host and host hosts share the host hosts in the network IP, on the other hand, the virtual host is also set by VirtualBox IP in advance DHCP allocation of a 10.0.X.XX IP address, which is why we look at the IP address of the virtual host, is a 10-segment IP.

Because of the NAT way connection, the virtual host and host host common one entity network IP address to access the entity's network, so the virtual host can access host host and host host network any one can connect entity host, and because the virtual host also has VirtualBox 10 network segment IP, Therefore, the host host and other machines in the host network will not normally be able to access the virtual host, and the virtual host may not normally be able to access other virtual hosts.

But not the host host has no way to access the virtual host, our VirtualBox provides a port forwording to access the virtual host. Click the Green labeled button below to enter the settings interface set up the host (including host host) on the entity network to which you want to access the virtual host.

The Third Way: bridged Adapter (bridging)

This way is the virtual machine network card and host network card connection, in the virtual machine to obtain a host IP segment of the Internet IP, so as to achieve the effect of network interconnection. In this way of connection, the virtual machine has a host in a network segment of the IP, and also has the same host network settings, so the virtual machine can be with the host and host network of any machine network access.

Choose the way, the basic other settings are also the default nature, but there is a point to pay attention to, and I just started is not to pay attention to this point, in the beginning even if the choice of bridge, also can not carry out network interconnection ....

Therefore, the name incredible, bridging is the network through the "bridge" to connect, "bridge" side of nature can not choose, is the virtual machine network card name, so no choice, but for the host, may display the network adapter does not mean one, in different environments may only have different network adapters can be used to access the Internet, If the network adapter "Local Area Connection" is active when using a wired connection, can bridge with the virtual, to achieve the effect of interconnection, but if you are using a wireless network to the Internet, then you bridge in the "Local Connection" network, the virtual machine may be the network is a limited connection, And there is no IP assigned to the host network segment. Select the network settings to be bridged here, as shown in the following figure:

The Fourth Way: in ternal Network (internal network)

This is similar to bridged adapter, but there is a big difference, only the name named: intnet (Default), which is marked in the following figure, is bridged to a network for network interconnection, Therefore, this situation is usually used in the host computer with multiple virtual machine-cut virtual machines need to network interconnection between the use.


A virtual machine that makes this network setting, the virtual machine cannot access the host, the host cannot access the virtual machine, and each virtual machine requires network interconnection, and the IP address of the same network segment needs to be manually set.

The fifth way: host-only Adapter (Standalone network card mode)

This way is also a more common way, we installed VirtualBox, our host network adapter inside will be a virtual one named: VirtualBox host-only Ethernet Adapter network card, when we choose this way, VirtualBox will automatically choose to connect to this virtual out of the network card.

We can carry out any network setup to this fictitious network card, can through the flexible setting to complete the virtual machine to host network interconnection, but all these need the user has certain Network Foundation to be able to configure practical this method.

To sum up, just use VirtualBox for network interconnection, the second and third way is relatively simple and convenient, especially the third way personally think is a good method, simple and practical. As for the fifth, the use of higher requirements, but also a good way.

Reference documents:

Http://reverland.bitbucket.org/VirtualBox_net.html

Http://www.virtualbox.org/manual/ch06.html

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

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.