VirtualBox Configure virtual network card (bridge) for host-Virtual Machine network interoperability

Source: Internet
Author: User
Tags oracle vm virtualbox vm virtualbox

Recorded under the VirtualBox Configuration Virtual network card (bridge), the implementation of the host-virtual machine network interoperability process, the online search out of the relatively chaotic, said the shady, so according to their own once, confirm the feasible way, make a backup, convenient for future inspection.

Environment:

ubuntu installed in Oracle VM VirtualBox, the specific version name is: Ubuntu-14.10-server-amd64

STEP1:

VirtualBox in the virtual machine state, set:

Step 2:

Virtual machine boot up, input command: sudo ifconfig or sudo ifconfig-a view current NIC configuration

View current IP Address

STEP3:

Input command: vim/etc/network/interfaces

Open the network card configuration file, add eth1, save the changes. The contents of the modified file are as follows:

# This file describes the network interfaces available on your system# and how to activate them.  For more information, see Interfaces (5). # The loopback network Interfaceauto loiface Lo inet loopback# the primary Network Interfaceauto eth0iface eth0 inet dhcpauto eth1iface eth1 inet Static
#本机当前ip地址, through the STEP2 ifconfig query out can address 192.168.56.11netmask 255.255.255.0
STEP4:

Restart the virtual machine (restart the host computer if necessary), and command ifconfig to view the current network card settings. Can see eth1, and have value, can.

STEP5:

1) cmd in Windows, command: ipconfig view current IP

2) in Ubuntu, enter command: Ping 192.168.56.1,enter, shown as follows:

 

The virtual machine accesses the host IP and passes.

Similarly, pinging the virtual machine IP in host cmd also goes through:

Results:

At this point, the virtual machine and Host Bridge network card successfully, IP interoperability, and the virtual machine successfully access the external network through the host network.

PS: About the specific contents of the configuration file, I did not scrutiny, nor too clear. This article is also after a period of time, recalled the writing, configuration steps such as missing, welcome to correct.

VirtualBox Configure virtual network card (bridge) for host-Virtual Machine network interoperability

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.