Virtual Box under Windows XP – configuring a bridged network (before v2.1.x)

UPDATE - 28 January 2009

With VirtualBox version 2.1.0 and higher you DO NOT need to bridge network connections, and you will not find the icon of a little network card with the + on it.  In fact, the networking works a lot more like Virtual PC which makes life much easier.

You can either configure the network to use NAT (which is how I first installed Windows 7 beta on Vista x64), or in the virtual machine Settings->Network select Adapter 1, change the Attached To drop down to Host Interface, and then in the list of Host Interfaces you select the local network connection for which the guest should have access.  When you run the guest it can then do things like request it's own IP address via DHCP. 

I actually tested this (VirtualBox v2.1.0) by connecting Adapter 1 to my LAN connection and Adapter 2 to my WiFi connection and it worked perfectly within Windows 7 beta.  The only glitch is that if you enter network settings again it doesn't highlight the currently selected host interface, however, on the main Settings screen you can clearly see the two guest network adapters and how they are connected to the host adapters.

Final network configuration in VirtualBox


STEP ONE

In Windows XP, go to Start Menu -> Control Panel -> Network Connections. You should see something like the image below.  The 'real' network connections on this system are Local Area Connection, a Gigabit network interface and Wireless Network Connection 2.

Network Connections before VirtualBox

STEP TWO

You must have a least ONE virtual machine to be able to configure networking under VirtualBox, although the virtual network card created can be used across multiple virtual machines.

Create a new virtual machine in VirtualBox UI, use the Create New Virtual Machine wizard,

1.       Machine menu, select New. Click Next.

2.       Enter a Name for you virtual machine, leave O/S as Other/Unknown or the O/S you are about to install. Click Next.

3.       Set the memory allocation. Click Next.

4.       At the Virtual Hard Disk page, select an existing disk image (or create a New disk image). Click Next.

a.       For this example I clicked on the New button, selected a new Dynamically expanding partition, 2Gb in size and accepted the default file location

5.       Click Finish.

Now you have the new virtual machine, you set up the network as follows,

1.       Highlight the new virtual machine, click on the Settings toolbar icon to open the Settings dialog. 

2.       Select Network from the left hand menu.

3.       Configure Adapter 1

a.       Tick Enable network adapter

b.      Change the Attached to drop down list to the setting Host Interface

c.       In the section called Host Interfaces below the drop down lists, click on the Add New Host Interface icon (a network card with a + symbol)

d.      Leave the network name as the default name, VirtualBox Host Interface 1

e.      Click OK

f.        In Windows XP you may then see a warning dialog. If so, confirm the installation of the VirtualBox TAP Adapter by clicking Continue Anyway (this warning is due to the VirtualBox driver not being signed)

g.       You should now see Virtual Host Interface 1, appear in the Host Interfaces list. Select this new interface so it is highlighted.

h.      You can now click on the OK button in the Settings dialog to finish the network configuration

Final network configuration in VirtualBox

STEP THREE

Although it may appear you have only been configuring VirtualBox, but what we have just done is add a virtual network adapter to Windows XP. If we return to the Network Connections control panel applet, and we refresh the list, we now see a new item has appeared Virtual Host Interface 1,

New network adapter

We now need to link the new VirtualBox adapter to one of the real network connections on our system.  Click on Local Network Connection (Gigabit in our case) and then Ctrl+Click on Virtual host Interface 1  so that both are highlighted.  Right click on one of the highlighted cards, and select the option Bridge Connections,

Bridge Connections option

Windows XP will configure a new bridge connection,

Creating the Network Bridge

If we return to the Network Connections control panel applet, and we refresh the list, we now see a new item has appeared Network Bridge,

Network Bridge

 The Network Bridge item lists the status as Network cable unplugged. This wil change to Connected when the virtual machine is started and the network interface driver within the virtual machine is installed.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
Print | posted on Wednesday, November 26, 2008 2:31 PM

Feedback

# re: Virtual Box under Windows XP – configuring a bridged network

left by Sean at 12/11/2008 1:08 AM Gravatar
Thanks for this guide. I am a newb to VirtualBox
and found the above clarified my understanding of how to configure the lan connection between
XP host machine and XP VirtualBox machine. I can get it to work for DHCP setup but not for Static IP addressing. I made sure to configure both adapters with differing IP addresses from the 192.168.X.X range but never can get either XP machine to ping the other one and feel I am missing something? Any ideas how to work this on static ip addressing as this is my preferred network setup? Both connections show connected and go through a router.

# re: Virtual Box under Windows XP – configuring a bridged network

left by Zxed at 12/16/2008 6:44 PM Gravatar
doesnt work for me for some reason., after creating the bridge,. the physical machine looses network but the virtual machine gains it... i cant seem to get both of them onto our network.

# re: Virtual Box under Windows XP – configuring a bridged network

left by Larry Bailey at 1/15/2009 5:26 PM Gravatar
Your howto hits the mark.
Works like a charm.
I run the Vyatta 4 Beta router bridged under XP.
Why,I have no clue.
It's really simpler to just install and use XORP router for Windows.
But,VM's do come in handy.

# re: Virtual Box under Windows XP – configuring a bridged network

left by Larry Bailey at 1/15/2009 9:29 PM Gravatar
Before I bridged the TAP device and the physical interface,I set the physical adapter being bridged,to "Obtain Network Address Automatically".
In LINUX,a physical adapter is configured as 0.0.0.0.
Bridge the physical adapter and the TAP,via the instructions given.
Give the newly created bridged device an IP address,such as 192.168.233.5.
In your VM,set an IP address of 192.168.233.15.
You should be able to ping both the bridged interface and the VM.
DHCP works like it does,for any Windows client.

# re: Virtual Box under Windows XP – configuring a bridged network

left by Justin Tolman at 1/28/2009 7:12 AM Gravatar
I don't have the add network adapter in Virtual box (the little network card with the +). I am running WIN7 in Virtual box version 2.1.2. Looks like that is the newest version. Not sure what to do.

# re: Virtual Box under Windows XP – configuring a bridged network (before v2.1.x)

left by Liam Westley at 1/28/2009 8:53 AM Gravatar
Justin,

With Virtual Box 2.1.0 and above, there is no need to bridge networks. I have updated the blog with the information and how networking is much, much easier. I have even included a screenshot of my Windows 7 beta guest displaying two network connections configured without manual bridging. Joy !

# re: Virtual Box under Windows XP – configuring a bridged network (before v2.1.x)

left by Rich at 3/1/2009 2:06 PM Gravatar
- Win XP Host (with Zonealarm) / WinXp Guest
- Using 192.168.0.1-255 in trusted zone
- Host: 192.168.0.101 (dyn)
- Guest 192.168.0.198 (set)

I have used the new configuration with Virtual Box 2.1.4. The guest is able to access the internet, it can tracert to the host. Host cannot tracert to guest. Both cannot telnet to each other (Could not open connection to the host, on port 23)
I need to call a webservice on the guest, so the connection must really work.
Anyone with a similar setup and got it working?

Thanks in advance.

# re: Virtual Box under Windows XP – configuring a bridged network (before v2.1.x)

left by Liam Westley at 3/2/2009 11:29 AM Gravatar
Rich,

Just configured following under VirtualBox 2.1.2

Host: 192.168.0.24 (dyn, DHCP), Win7 Beta
Guest: 192.168.0.120(set, fixed), XP SP1

I configured networking on VirtualBox 2.1.2 not to use NAT but to use Host interface, and selected my gigabit network connection (not WiFi).

I could ping and run tracert from host to guest and from guest to host without problems.

It may be switching from default of NAT networking to Host interface networking that did the trick. On switched off VM, right click, Settings, choose Network from the left hand menu and change the 'Attached To' settings for Adapter 1 to 'Host interface'.

Ta

Liam

# re: Virtual Box under Windows XP – configuring a bridged network (before v2.1.x)

left by ika at 3/12/2009 9:56 AM Gravatar
does it create a vlrtual local area networks in windows xp?

# re: Virtual Box under Windows XP – configuring a bridged network (before v2.1.x)

left by Liam Westley at 3/13/2009 10:12 AM Gravatar
The step by step instructions were when using Windows XP as the host o/s. I don't think the guest o/s version would matter.

It's just with v2.1.0 and higher you can just configure VirtualBox to use a local network adapter as a Host Interface and it does all the virtual LAN hookup in the background without any manual configuration.

# re: Virtual Box under Windows XP – configuring a bridged network (before v2.1.x)

left by Jay Guthrie at 4/8/2009 6:26 AM Gravatar
Hi,
I'm working with VBox 2.1.4. I have an XP host and an XP guest. From your site I was able to understand why I don't have the "Add Host Interface" option (thank you). But I have yet to succeed and creating the network connection. I have tried both NAT and Host Interface (w/Broadcom Gigabit Ethernet selected) to no success. No Virtual Box Adapter is showing up in the host network connections. And nothing is showing up under network connections for the guest. Any suggestions would be greatly appreciated.

# re: Virtual Box under Windows XP – configuring a bridged network (before v2.1.x)

left by Jay Guthrie at 4/8/2009 6:28 AM Gravatar
This link mentions the same problem.
http://www.hardforum.com/archive/index.php/t-1394273.html

# re: Virtual Box under Windows XP – configuring a bridged network (before v2.1.x)

left by sufi at 5/6/2009 7:10 PM Gravatar
i need this

# re: Virtual Box under Windows XP – configuring a bridged network (before v2.1.x)

left by czeshirecat at 7/9/2009 4:34 AM Gravatar
Im running vista with virtual box 2.2.0 r45846 running an XP virtual machine. Yes I know this article's about XP, but the general approach was pretty identical.
Virtbox created a Host only adapter for me automatically which I edited manually later. In the configuration editor I disabled its DHCP server, enabled its manual configuration of the adapter and gave it a static address on my LAN (that was out of range of the addresses being served by my DHCP serving router). Then bridged this host adapter to my local connection in control panel in Vista.
The virtual machine then got its own IP address from DHCP on my router and worked great.
At first I tried leaving the IP setting of manual config settings empty, but that just led to the virtual machine showing an IP address of 0.0.0.0 when I ran it.
I'm not sure what I did "right" by giving an IP address in here. Would be interested in understanding the logic.

# re: Virtual Box under Windows XP – configuring a bridged network (before v2.1.x)

left by Vivek at 9/29/2009 9:00 PM Gravatar
Hi,I installed VB3.0.6 on Windows XP to run Ubuntu .
After Installation i am able to see VirtualBox Host Only Adapter in Device Manager, but when i try to choose Host only Adapter throught Settings=>Networks ,
That adapter is not coming in Drop Down menu . Please let me know who to solve this.

# re: Virtual Box under Windows XP – configuring a bridged network (before v2.1.x)

left by id at 3/16/2010 9:40 PM Gravatar
Vivek can you check other adapters?

# re: Virtual Box under Windows XP – configuring a bridged network (before v2.1.x)

left by robin at 4/12/2010 5:47 PM Gravatar
Hola, donde puedo bajar el driver de virtualbox 3.1 ???

# re: Virtual Box under Windows XP – configuring a bridged network (before v2.1.x)

left by Liam Westley at 4/12/2010 7:25 PM Gravatar
@robin

You can download VirtualBox 3.1 from http://virtualbox.org.

Older builds are available at http://www.virtualbox.org/wiki/Download_Old_Builds

# re: Virtual Box under Windows XP – configuring a bridged network (before v2.1.x)

left by kangtatang at 2/28/2011 11:05 PM Gravatar
Thanks for the tutorial..
now I Can make the Host OS and Client OS Connected :D
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: