Using VirtualBox Host Interface Network

Filed in Laptop & Notebook , Linux Tips , Software , Technology 36 comments

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:

  • Not attached
  • NAT
  • Host Interface
  • Internal Networking

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)

Sun VirtualBox Interface

Then click on Settings button or press CTRL+S short cut key and the following menu will appear. Then, press on Network menu.

VirtualBox Network Configuration

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:

Host Interface Network

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:

Add Host Interface Menu

The following popup will appear

Add Host Interface Pop Up

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

Hardware Installation Warning

Once clicked on Continue Anyway,VirtualBox Host Interface will be created.

Creating Host Interface

After several seconds, the Host Interface successfully created with name VirtualBox Host Interface 1.

VirtualBox Host Interface 1

Next step is to create Network Bridge to bridge VirtualBox Host Interface with physical Local Area Network connection.

Bridge Host Interface & Local Area Network

Bridge Host Interface Process

Then, click on Start button to start your guest machine. In this case, I’ve started my RHEL 5 guest machine.

Start VirtualBox

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).

Physical IP on Guest Machine RHEL 5

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.

Posted by Far East   @   26 April 2009 36 comments
Tags : , , , ,
Try us on Wibiya!

Share This Post

RSS Digg Twitter StumbleUpon Delicious Technorati

36 Comments

Comments
May 14, 2009
5:07 am
#1 abhay kumar :

whwt is the dark side of virtualization ,it type and whwte is the couse of that disadvantages.how to solve it.
what is the benefit of rhel virtualization.types of rhel virtualization.which are the best for compnies and which are
for pcs.why virtualization is important.

May 19, 2009
10:05 pm
#2 Dun :

Hi great article.

I want to do the exact thing you doing.

Can you tell me what version of virtual box you are using?

Because I cannot create the “VirtualBox Host Interface 1″ there is no “Add No Interface” button

In my version, my network connections are already listed in the Host Interface area box.. Is there any other way i can create a new host interface?

Thanks,
Duniya

Author May 20, 2009
3:05 am
#3 Far East :

Hi Duniya, I am using VirtualBox Version 2.0.6. What version of VirtualBox that you currently used?
If Host Interface already exist, then just bridge them with working LAN connection in “Network Connection” (Start > Control Panel > Network Connections).
Hope this will help you.

May 20, 2009
10:15 pm
#4 duniya :

I’m using VirutalBox 2.1.4

Under Host Interface I got my wireless and lan.

My lan is no connected.

Anyway I tried bridging my lan and wireless, which created a MAC Bridge miniport.

I selected this in the host interface. But now i cannot ping at all in from the VM

Author May 22, 2009
4:23 pm
#5 Far East :

Okay, Duniya..I’ve tried to use VirtualBox Version 2.1.4, and I noticed that, we can use physical connection (physical IP) without bridging our LAN and Host Interface. What you can do is, remove all your Network Connection (LAN or Wireless) from bridge. Then, delete the bridge that you have created before. Then, on your VirtualBox Network setting, just choose one of your working network connection (LAN or Wireless). Then, your Guest OS will use the physical IP. Let me know if you’ve success or failed to do that. Happy trying.. :)

May 29, 2009
10:21 pm
#6 Duniya :

I think I got it too work now..

The problem was due to my firewall.

I think the new version of virtualbox automatically does the network bridging, all the user needs do is select the host interface.

When I disabled my firewall I was able to ping between the host an VM.

Thanks for your help..

Jun 4, 2009
8:19 pm
#7 viren :

Hi,
I have installed OEL 5.O on the host and also i have installed Sun Virtualbox and have created a guest which also has
OEL 5.0 installed, my main purpose is to install 11i apps s/w on this machine, i want to use bridge networking, so that the
host and guest can communicate with each other and i would be able to do a multi node install.
Please help me to eastablish bridge networking…so that the host and guest can communicate with each other.

thanks
viren

Jun 4, 2009
8:19 pm
#8 viren :

Hi,
I have installed OEL 5.O on the host and also i have installed Sun Virtualbox and have created a guest which also has
OEL 5.0 installed, my main purpose is to install 11i apps s/w on this machine, i want to use bridge networking, so that the
host and guest can communicate with each other and i would be able to do a multi node install.
Please help me to eastablish bridge networking…so that the host and guest can communicate with each other.
thanks
viren

Jun 19, 2009
12:28 pm
#9 gvlax :

Hi,
but how to configure/bridge a host and a guest so that they are visible from other hosts in network as two separate hosts ? Actually, this is my problem. Host/guest can ping each other but from other hosts in the network only the host is reachable…

Pls, any hints?

gvlax

Author Jun 21, 2009
9:03 am
#10 Far East :

Hi gvlax, is your host and guest OS reside in same network segment? if you setup the network bridge properly, guest OS should be visible to host and any other network.

Sep 29, 2009
2:09 am
#11 Vivek :

Hi,
I am trying to setup Ubuntu on WinXp using VirtualBox 2.1.4 .
The problem I am facing is that in Networks, when i select HOST INTERFACE, it doesnt lists any HOST INTERFACEs, although I can see in Device Manager.
When I see the same Device In My Network Connections, its status is showing Network cable unplugged,Although the Ethernet Adapter is connected .(the VirtualBox Host Interface checkbox is ticked)

May i Know how to Enable this Ethernet Adapter?

Thanks in Advance,
Vivek

Author Sep 29, 2009
12:59 pm
#12 Far East :

Hi Vivek, I suggest u to use the latest version of Virtual box 3.0.x or later..host interface and network bridging has been setup automatically upon installation..

Jan 22, 2010
5:25 pm
#13 Carolina :

Hola!!!

En un servidor windows 2003 standar, instale virtual box con sistema operativo windows server 2008 enterpraise. hago el puente y todo va muy bien , hasta que hago el puente. Cuando creo el puente entre las dos redes, pierdo la conexion del servidor anfitrion y se apaga.

ah! tambien en las opciones de redes que tengo en el virtualbox, no tengo host anfitrion sino adaptador solo anfitrion. es lo mismo?

espero su colaboración, muchas gracias

Author Jan 23, 2010
9:58 am
#14 Far East :

Hola Carolina, what Virtualbox version you use? Have you tried the latest version of Virtualbox because new version of Virtualbox will automatically create the bridge for you during installation. By the way, bridge and host only not same. Bridge you can access your virtual win server 2008 from any machine in your network, but you can access your virtual win server 2008 ONLY from win server 2003 if you use host only. Hope this help. :)

Jul 27, 2010
7:27 am
#15 PIERCEGena :

A lot of specialists say that home loans help a lot of people to live their own way, just because they are able to feel free to buy needed stuff. Furthermore, a lot of banks give collateral loan for young and old people.

Aug 5, 2010
10:56 am
#16 ravi :

Hi,

I want to set up guest machine typically Linux on my host machine typically windows 7. With this setup I want my guest & host machine can access each other using ssh or url. Also I want that my guest machine to be accessible from other some host using internet or URL.

Author Aug 5, 2010
12:46 pm
#17 Far East :

Hi Ravi, in your case the only option you have is use bridge instead of NAT and Host Only.

Aug 6, 2010
1:04 am
#18 ravi :

But How can I access my Virtual machine outside of my LAN i.e. using internet on some other machine?

Author Aug 6, 2010
2:11 am
#19 Far East :

Hi Ravi, did you mean ‘remote’ to your virtual machine via internet? Sorry, I don’t know what you are trying to do..:)

Sep 6, 2010
7:40 am
#20 hana :

hello dear;
i have a win xp host and a open suse guest on VBOX. i want create a FTP server on open suse. so use network bridge, but after create bridge the host disconnect from network. can u help me?? i have host and guest are reachable from network.

Sep 10, 2010
4:25 am
#21 KRG :

Hi,

I created a guest using VirtualBox 3.2.8 and have OpenSuse-11.3 running as a guest. I created a bridged network and connected the VB adapter to the real adapter (bridged it). Now i cannot connect to the host from the network. Any ideas?

Author Sep 11, 2010
2:51 pm
#22 Far East :

Hi KRG, if you use virtualbox version 3.0 and above, bridge created automatically during installation. Not necessary to create virtualbox manually as show above.

Author Sep 11, 2010
3:00 pm
#23 Far East :

Hi Hana, recommended you use latest version Sun Oracle Virtualbox. Bridge created automatically during installation and no need to create other manual bridge. Thanks

Nov 17, 2010
7:37 pm
#24 Baban :

hi!!! i’m using solaris 10 as guest os. i want my solaris vm to be visible in windows network as the host os is doing.

Author Nov 24, 2010
9:22 pm
#25 Far East :

Hi Baban, of you want your guest machine visible to physical network, use bridge.tq.

Jan 18, 2011
10:56 pm
#26 Kev :

Thanks for this – I’d been using NAT & Bridging to connect to 2 different networks (172.* & 192.*) under Virtualbox.
Up until I installed 4.0 this all worked fine.. now it appears I needed to use NAT on my wired interface and Host Only on my wireless one and this page helped me to realise this. Thanks very much.. (Maybe I was doing it wrong all along!) :)

Jul 25, 2011
7:51 pm
#27 Anh :

Thank you for the important information I managed to get from your web page.,

Aug 24, 2011
6:13 pm
#28 DrSofts :

Hello,
this post saved me a lot of time i could spent struggling with this tip
thanks

Sep 27, 2011
3:05 pm
#29 Mukesh :

hi,I have using my host machine in windows 7 & guest machine CentOs5.2 through SunVM vitual box,Now i want to access each other using ssh,putty.Now i am accessing net through data cable, my Host local area connection IP :192.168.186.1 so, what network setting required in SunVM machine & what should be the linux IP , so that i can communicate host to guest.

Author Sep 27, 2011
3:13 pm
#30 Far East :

Mukesh,
1. To communicate your host guest WITHOUT internet – use host only
2. To communicate your host guest and your GUEST required internet, then use bridge

Sep 27, 2011
3:50 pm
#31 mukesh :

i want to use internet but not able to ping guest server through host .Can you give a step to config bridge.
Guest Machine IP eth0=10.0.2.15,eth1=192.168.183.1
I enable NAT & host Interface adapter.

also i have access the internet on both of them,host & guest but not ping host to guest.
Plz guide.

Author Sep 28, 2011
5:45 pm
#32 Far East :

To configure bridge, just choose Adapter type to bridge instead of NAT or Host Interface. By the way, which vbox version you used?

For IP, you should use IP with same segment with physical IP. Since your physical IP is 192.168.186.1, then your guest OS should use 192.168.186.X
or use DHCP instead of static IP, and your guest OS will get the physical IP automatically.

Oct 3, 2011
10:49 pm
#33 meliweb :

no way ! I successfully did the bridge but then none of my computer could access internet ! So I took of the bridge my local connection on the host, and it’s working again.
I’m now trying to put both cards on my guest VM (NAT for internet and HOSTONLY for local cnx). Really I found this quite hard…

Nov 10, 2011
3:18 pm
#34 Luis :

Thanks you, very useful information

Trackbacks to this post.
Leave a Comment

Previous Post
«
Next Post
»
Delighted Black designed by Christian Myspace In conjunction with Ping Services   |   French Teacher Jobs   |   Maths Teacher Jobs