How to network Bridge on Windows

Discussions related to using VirtualBox on Windows hosts.
rats
Posts: 10
Joined: 2. Jun 2007, 16:28

Post by rats »

Hello Bodhi,

I know it has been quite awhile since I told you I would let you know if I was able to get networking set up on my VBox Windows XP host and Debian Etch guest. I had to deal with some unexpected personal things as well as the setup.

Anyway, I finally got everything working. I have checked what I did to get it working by installing VBox on another Windows XP host and Debian Etch guest . Both setups are working fine. I have been able to install SSH and run Putty, install and run TightVNC and use all LAN functions. I'm very pleased with the setup.

The installation of VBox, creation of the guest and installation of Debian Etch was done in the normal fashion. Once that was completed I followed the following steps to setup networking.

I. Create Network Connection in VBox
1. Open VBox¬¬? Settings? Network;
2. Click on “Attached to” and then select “Host Interfaces”;
3. In Host Interfaces click Add;
4. Type "VirtualBox Host Interface #" without the quotation marks where the # represents a number for the interface, usually 1 (on one computer the name of the virtual box host interface appeared automatically, on the other computer I had to type the information);
5. Click OK, and
6. Close VBox

II. Create a Network Bridge
1. Open Control Panel?Network Connections;
2. While holding down Ctrl select the Local Area connection and click on the VirtualBox Host Interface;
3. Right click on one of the selected connections; and
4. From the drop-down menu select Create Network Bridge

Since I am using static IP’s on my network set up I had to configure the TCP/IP properties for the Network Bridge.

5. Right click on the Network Bridge that was just created;
6. Select TCP/IP;
7. Click on Properties;
8. Set the Static Connection Values; and
9. Close Network Connection.

III. Set Network Adapters to promiscuous mode

When VBox and the guest VM load Windows XP should put the network adapters into promiscuous mode, but sometimes this does not happen. Therefore, I think it is best to force the adapters into promiscuous mode. It is only necessary to do this once.

1. Open a Windows command prompt (Start?Run and type "CMD" without the quotes and press ENTER;
2. Type "netsh bridge show adapter";
3. There will be a line of information displayed for each network adapter in the Bridge. Look for any adapter that is listed as disabled, note the number of the adapter and go to step four.
4. Type "netsh bridge set adapter # forcecompatmode=enable" for each adapter that was listed as disabled, inserting the number of the adapter for the #;
5. Type "netsh bridge show adapter" once again to check to see if your adapters have been enabled;
6. Exit the command prompt; and
7. Reboot the computer.

III. Configure the TCP/IP Properties for the Debian guest

Again, this is necessary because I am using static IP's in my LAN.

1. Open VBox;
2. Start Debian;
3. Since I have installed GNOME desktop I will open Networking by clicking Desktop?Administration?Networking;
4. Select Ethernet Connection eth0;
5. Click on Properties;
6. Set the static configuration for the Debian VM;
7. Close Networking; and
8. Reboot Debian.

After Debian has rebooted LAN connections with the host and any other computers on the network should have been established.

That is it. It worked for me. Please let me know if you have any questions concerning this set up. I have typed these instructions from notes I made while I was setting up my computers. There may be a better way or a faster way to set this all up, but I could not find it. This is what works for me.

rats
jza
Posts: 50
Joined: 7. Jun 2007, 19:05
Location: Villahermosa, Tabasco
Contact:

Post by jza »

One problem that I get on this tutorial is when I am bridging the cards. I get a dialog saying:
The Network Bridge cannot be configured while other network connection property sheets are open.
This seem to disable whatever is coming after. Any help?
jza
Posts: 50
Joined: 7. Jun 2007, 19:05
Location: Villahermosa, Tabasco
Contact:

Post by jza »

I got it solved but maybe this will need to be added to the tutorial:

Make sure both connections show under the Network Bridge:
Network Bridge
---------------------------------
Network Bridge (Network Bridge) Network Bridge Connected
<your custom interface> Network Bridge --------
Local Area Connection Network Bridge --------
The ---- Should be something like waiting on connection and should turn into Connected, Bridged once the VM is running.

By just having both interface selected and adding the Bridge network they WON'T instantly bridge. They will juts only create the Network Bridge zone. You then need to individually add them by right clicking and selecting Add to Bridge
bilou_gateux
Posts: 10
Joined: 24. Jun 2007, 10:44
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: MS Windows XP Embedded SP3

Procedure for Creating a Network Bridge

Post by bilou_gateux »

venky4447
Posts: 8
Joined: 27. Mar 2008, 15:19

Reg: VirtualBox Host Interface1

Post by venky4447 »

Hi Rats,

Thanks a lot for providing the instructions of installing and configuring the network.

I tried with your instructions but then also i was unable to provide the communication.

Let me explain you my configuration in detail.

Host : Windows xp sp2
Guest : Windows 2003 Server

I have one ethernet card with my PC.Which i normally use for internet and one more point the LAN connected to the ethernet card uses automatic settins for IP & etc.

NOTE : But always i will 192.168.1.2 as my IP.

I am using VirtualBox version 1.4.0

As per the instructions provided by you i had created new virutalBox host interface1 and bridged them

When i ran the command "netsh bridge show adapter", Then i got the below output.

----------------------------------------------------------------------
ID AdapterFriendlyName ForceCompatibilityMode
----------------------------------------------------------------------
1 VirtualBox Host Interface 1 unknown
2 Local Area Connection 3 unknown
----------------------------------------------------------------------


When i connect the network cable i get all 3 LAN connections in the start bar

1.Local Area Connection
2.Network Bridge
3.VirtualBox Host Interface1

Can you tell me then next instrutions of how to configure the guest

please tell me how to test the connection between host and guest .


Thanks in advance.

Venky.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Reg: VirtualBox Host Interface1

Post by Sasquatch »

venky4447 wrote:Hi Rats,

Thanks a lot for providing the instructions of installing and configuring the network.

I tried with your instructions but then also i was unable to provide the communication.

Let me explain you my configuration in detail.

Host : Windows xp sp2
Guest : Windows 2003 Server

I have one ethernet card with my PC.Which i normally use for internet and one more point the LAN connected to the ethernet card uses automatic settins for IP & etc.

NOTE : But always i will 192.168.1.2 as my IP.

I am using VirtualBox version 1.4.0

As per the instructions provided by you i had created new virutalBox host interface1 and bridged them

When i ran the command "netsh bridge show adapter", Then i got the below output.

----------------------------------------------------------------------
ID AdapterFriendlyName ForceCompatibilityMode
----------------------------------------------------------------------
1 VirtualBox Host Interface 1 unknown
2 Local Area Connection 3 unknown
----------------------------------------------------------------------


When i connect the network cable i get all 3 LAN connections in the start bar

1.Local Area Connection
2.Network Bridge
3.VirtualBox Host Interface1

Can you tell me then next instrutions of how to configure the guest

please tell me how to test the connection between host and guest .


Thanks in advance.

Venky.
If you have internet on the Host, then the bridge seems to work fine. Next thing is to start the Guest, and make sure that you have 'Obtain IP address' selected as IP settings. Then it should recieve an IP address from your DHCP server. If it does not, and you end up with an APAPI address (that is, 169.254.x.y), or Limited Connectivity, then set the address statically, using any random address in the range of 192.168.1.3 to 192.168.1.254, default gateway and dns server pointing to your router (probably 192.168.1.1).

Internet test can be done using a ping, or just open IE and go to a random site. Network test between Host and Guest, just enter \\192.168.1.2 in the Guest to reach the host, use the ip address of the Guest on the host for the other way.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
venky4447
Posts: 8
Joined: 27. Mar 2008, 15:19

Re : reg : virutalbox host interface1

Post by venky4447 »

Hi Sasquatch,

Thanks for the instructions.

I tried with the instructions on the guest computer but then also it is not working.

I have some doubts.

When i start my guest computer i am getting two network lan's

One will be in connected state with some garbage IP.
Other one will be searching for connection but it will never connect.

Should i bridge these two connections ?

When i start my Guest comp the virtualbox host interface in host computer gets connected.

Can you help me in this issue.

One more doubt which i like to ask is should i unplug the network cable when i try to start the guest computer ?

Please advice me.

Thanks in Advance,

Venky.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

You have to create a bridge with your physical interface and your virtual interface. I don't know what garbage IP you get on what interface, and what interface is searching for network, but the garbage one would probably have 169.254.x.y. The other one might be the lan you use for internet. That one should recieve an address from your router. If you bridge them, then it doesn't matter if the Host has an IP or not, the Guest will recieve an IP from the router too.

You only bridge the internet interface and the virtual interface (the one that comes connected when the VM is turned on).
Give some more info about the interfaces you have on the Host.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
venky4447
Posts: 8
Joined: 27. Mar 2008, 15:19

Reg : VirtualBox host interface1

Post by venky4447 »

Hi Sasquatch,

Thanks for providing the reply with information,

I think i have an update now i am able to ping Guest computer from Host computer. But i am unable to ping the host from guest.

I made the LAN's in host asstatic IP by providing the inputs for LAN Ip and etc.


Host LAN :

Ethernet adapter Network Bridge (Network Bridge):

Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.1.2
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

Guest LAN :



Ethernet adapter Local Area Connection 3:

Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.1.5
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

Ethernet adapter Local Aread Connection:

Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.1.11
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

Now i am unable to ping the host from guest , please help me.

The IP 192.168.1.11(static) is used for internet and the other(192.168.1.5) is made as dynamic.

Thanks in advance.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

Wy did you set two interfaces for the same network? The static one does the same as the dynamic one, only difference is you set the addresses manually for the first, as where the latter obtains the address from the router. remove of the interfaces (the static prefferably). You can just remove the 'cable'. Did you try to ping on name or ip address?
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
venky4447
Posts: 8
Joined: 27. Mar 2008, 15:19

Reg : Virtualbox host interface1

Post by venky4447 »

Thanks for the reply,

I ping the guest from host using the ip address.

I have disabled the static LAN in the guest computer. Disconnected my cable.

Now i have two LAN's 1.VirtualBox host interface 1 and network bridge bliking and connected in host.

In guest i have only one LAN.

Now also i am facing the same problem. I am unable to ping host from the guest computer.

Any clues , please help me.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

Ok, cable in the computer to the router so you have internet and can obtain dhcp. Start the vm, that has it's interface in the bridge. Try to obtain an ip address. If you got the proper address, check if you can ping the router. If you can, try internet. Does that work? Great, then try to ping your host computer on ip address. If that doesn't work, do you have a firewall running like the Windows XP firewall? By default, that blocks ping requests. You have to tick the checkbox in the exclusions that say file and printer sharing. Now you can ping it.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
venky4447
Posts: 8
Joined: 27. Mar 2008, 15:19

Reg : Virtualbox host interface1

Post by venky4447 »

Hi Sasquatch,

It really worked now iam able to ping Host from Guest.

Thanks a lot. I disabled my firewall in windows xp which is host computer.

Once again thanks.

Venky.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

:D Glad I could help. That damned Windows Firewall. Causes a lot of problems. Any normal firewall would give a dialog if it's allowed or not, or has the option to set a trusted zone.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
mattz
Posts: 95
Joined: 18. Feb 2008, 11:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WinXP/Debian/OSX
Location: Germany
Contact:

Post by mattz »

an easy to understand introduction to virtual networking (in german) can be found here:

http://www.nwlab.net/tutorials/virtualb ... rking.html

cheers ---mattz
Post Reply