I have installed many of time VirtualBox on Windows host. Most of VirtualBox user will simply use the default Virtual Networking which is “Not attached” mode or NAT mode.
By the way, VirtualBox have 4 Virtual Networking mode to be use which are:
The disadvantage of using NAT is it much like a private network behind a router. In other words, the virtual machine is invisible and unreachable from the outside internet. You cannot run a server this way unless you set up port forwarding. By using this mode, the virtual machine will be assigned with IP address like 10.0.2.0 because the virtual machine receives its network address and configuration on the private network from a DHCP server that is integrated into VirtualBox.
I want my virtual machine (guest machine) have the same prefix IP to my host machine. Let say my host Windows machine assigned to IP 192.168.1.201, then I want my guest machine assigned to 192.168.1.xxx instead of 10.0.2.0 or 10.0.3.0 (in NAT mode).
In my opinion, Host Interface is much suit my needs beside is it easy to configure. Here the way how to setup VirtualBox Host Interface. Notice that I am using the RedHat Enterprise Linux 5 (RHEL5) on my guest machine and Windows XP as my host machine.
The very first step is, launch the VirtualBox (I’ve already installed RHEL5)
Then click on Settings button or press CTRL+S short cut key and the following menu will appear. Then, press on Network menu.
The default VirtualBox Network Adapter “Not attached” is currently in use. Since we want to use Host Interface mode, then Not attached mode need to disable (untick the Enable Network Adapter box). Then, click on Adapter 2 tab and use the setting as shown below:
As we can see, there are red warning
No host network interface is selected on the Network: Adapter 2 page
The solution is just add the host network interface for it. See picture below:
The following popup will appear
You can rename to whatever Interface name you like, but I just leave it as it is. Then, click OK.
Incase the Hardware Installation warning come out as show in picture below, simply click on Continue Anyway
Once clicked on Continue Anyway,VirtualBox Host Interface will be created.
After several seconds, the Host Interface successfully created with name VirtualBox Host Interface 1.
Next step is to create Network Bridge to bridge VirtualBox Host Interface with physical Local Area Network connection.
Then, click on Start button to start your guest machine. In this case, I’ve started my RHEL 5 guest machine.
Yeay..my guest machine has been assigned to physical IP address (192.168.1.108) instead of virtual private network IP (10.0.2.0).
Since my guest machine assigned to physical IP address, then I can use FTP to transfer file from my host Windows machine to guest RHEL 5 machine and vice versa. I can use Putty to ssh to my RHEL 5 guest machine from Windows host machine. In other words i can treat my guest machine as another real and physical machine in my network. (I don’t know what the better word to describe my opinion).hihi.. But I hope this post will help those who want to use Host Interface mode in VirtualBox’s Virtual Network.
Pingback: Virtual box - Raymond.CC Forum