Virtualbox network configuration (figure)

Source: Internet
Author: User
Virtualbox network configuration (figure)-General Linux technology-Linux technology and application information. See the following for details. Reprint Please note: Shepherd Community http://www.muyangzhe.net
There are a lot of online tutorials on relevant materials, not nonsense.
The ultimate objective of this example is to access both the Internet and LAN.
Environment:
Physical Machine: Red Hat Enterprise Linux Server release 5 (Tikanga)
IP address of the physical machine: 192.168.18.99 Intranet segment: 192.168.18.X
Virtual Machine running on virtualbox: windows 2008 en

I'm a cainiao!
The Network Connection of virtualbox is slightly different from that of vmware. Now we feel that the vmware network is really convenient. Virtualbox mainly has the following methods (different versions have different naming methods, but they are essentially the same ):
NAT: can access the Internet, cannot access the host (or LAN)
Host Interface: can access the Host (or LAN), cannot access the Internet
Intelnal Network: build a virtual Network using all the virtual machines on the host

To achieve both Internet access and LAN access, I decided to adopt the NAT + interface method.
Specifically: Open virtualbox> Settings> network, enable network connection, and configure as follows.


(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // response); ">



Click here to confirm and run the VM. The local system will automatically create a virtual Nic named vboxnet0:


(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // response); ">



IP Address: 192.168.56.1
Enter the Virtual Machine System (winvows 2008 en is installed), set the IP address of the network card to the IP address of the same network segment of the virtual network card of vboxnet0, the IP address of the gateway is vboxnet0, 192.168.56.1


(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // response); ">



You can ping 192.168.56.1 but cannot connect to the LAN.
Then return to the physical machine,
System> Management> network, open network configuration> device, double-click the current device, and set the route as follows:


(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // response); ">



Save and exit, open the terminal, and restart the NIC:
/Etc/rc. d/init. d/network restart
Then you can access the Intranet normally, but you cannot access the Internet, that is, you cannot access the Internet.
Next, perform NAT. It is easy to shut down the virtual machine system first.
Same as above, set, network.
Select network connection 2 to enable NAT,


(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // response); ">


Start the system and you will find that there is an additional network card. The automatically obtained IP address is as follows:


(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // response); ">



Check that you can access the Internet normally and access the Intranet.


(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // www.muyangzhe.net/attachments/month_0908/0908042233a92fd9c4addfd691.jpg'); ">



If you have any questions, add them to the group: 44927431 (for convenience of others, please keep this information for reprinting)
Links that may be used in this article:
Virtualbox network configuration (figure)
Install Virtualbox in linux
/Etc/init. d/vboxdrv setup virtualbox installation error Solution
Use virtualbox Virtual Machine to install windows in linux
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.