VirtualBox implements network communication between host machines and virtual machines

Source: Internet
Author: User
Tags virtual environment

Abstract: implements network communication between host machines and virtual machines


Environment:

Host operating system Windows XP

Virtual Machine Software VirtualBox

Virtual Machine operating system Linux

 

Principle:

Host-only (host Mode)

In some special network debugging environments, you must isolate the real environment from the virtual environment. In this case, you can adopt the host-only mode. In host-only mode, all virtual systems can communicate with each other, but the virtual system and the real network are isolated.

Tip: in host-only mode, the virtual system and the host machine system can communicate with each other, equivalent to the two machines connected through twisted pair wires.

In host-only mode, the TCP/IP configuration information of the virtual system (such as the IP address, gateway address, and DNS server) is created by VMnet1 (host-only) DHCP servers in the virtual network are dynamically allocated.

If you want to use VirtualBox to create a virtual system isolated from other machines in the network and perform some special network debugging, you can select the host-only mode.

 

Steps:

1. Check the IP Address Configuration of the host machine:

Enter the ipconfig command in the window XP command prompt line


The host machine IP address is 192.168.56.1.

Then, we configure the IP address of the same network segment on the virtual machine. Communication

2. Configure VBOX

Set network connection in VirtualBox and enable host-only connection mode.


In the virtual machine LIUNX

# Cd/etc/sysconfig/network-scripts

# Cp ifcfg-eh0 ifcfg-eth1

# Vi ifcfg-eh1

DEVICE = eth1

IPADDR = 192.168.56.56

NETMASK = 255.255.255.0

# Service network restart

# Ping 192.168.56.1

OK



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.