Page 1 of 1

Networking breaks on Host when bridged Guest adapter is used

Posted: 26. Sep 2013, 16:48
by dremel
Hi!

I'm using VirualBox 4.2.18 on a Windows 7 Host. I'm running a Windows 7 Guest with a NAT networking adapter. Both the host and guest can access the Internet through the Wireless connection on the host, no problem so far.

Besides the Internet access, I want to use a USB to Ethernet dongle, connected to the Host, on my Guest OS. The Guest should use the adapter with a Fixed IP address of 192.168.128.2 for TFTP and web server purposes.
So I go ahead and create a 2nd network adapter for the Guest in the Settings: "Bridged Adapter", name: <my adapter name>. So far so good.

I can see and use the adapter in my Guest OS, but as soon as I start using it (i.e. traffic over the adapter), my Host OS loses network connectivity.
I thought this was due to the order of network interfaces in advanced network settings on the Host, but I've got it set to wlan > vbox > usb2eth, and after a reboot of the Host and Guest, the issue persists.

When the bridged adapter becomes active, the Host's routing table changes (obfuscated external IP addresses a bit):

Code: Select all

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0       xxx.103.4.1       xxx.103.5.2     25

       xxx.103.4.0    255.255.254.0         On-link        xxx.103.5.2    281
       xxx.103.5.2  255.255.255.255         On-link        xxx.103.5.2    281
     xxx.103.5.255  255.255.255.255         On-link        xxx.103.5.2    281
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
      169.254.0.0      255.255.0.0         On-link   169.254.202.142    276
  169.254.202.142  255.255.255.255         On-link   169.254.202.142    276
  169.254.255.255  255.255.255.255         On-link   169.254.202.142    276



        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link   169.254.202.142    276
        224.0.0.0        240.0.0.0         On-link        xxx.103.5.2    281

  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link   169.254.202.142    276
  255.255.255.255  255.255.255.255         On-link        xxx.103.5.2    281

===========================================================================
Persistent Routes:
  None
to:

Code: Select all

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0       xxx.103.4.1       xxx.103.5.2     25
          0.0.0.0          0.0.0.0    192.168.128.2   192.168.128.50     20
       xxx.103.4.0    255.255.254.0         On-link        xxx.103.5.2    281
       xxx.103.5.2  255.255.255.255         On-link        xxx.103.5.2    281
     xxx.103.5.255  255.255.255.255         On-link        xxx.103.5.2    281
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
      169.254.0.0      255.255.0.0         On-link   169.254.202.142    276
  169.254.202.142  255.255.255.255         On-link   169.254.202.142    276
  169.254.255.255  255.255.255.255         On-link   169.254.202.142    276
    192.168.128.0    255.255.255.0         On-link    192.168.128.50    276
   192.168.128.50  255.255.255.255         On-link    192.168.128.50    276
  192.168.128.255  255.255.255.255         On-link    192.168.128.50    276
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link   169.254.202.142    276
        224.0.0.0        240.0.0.0         On-link        xxx.103.5.2    281
        224.0.0.0        240.0.0.0         On-link    192.168.128.50    276
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link   169.254.202.142    276
  255.255.255.255  255.255.255.255         On-link        xxx.103.5.2    281
  255.255.255.255  255.255.255.255         On-link    192.168.128.50    276
===========================================================================
Persistent Routes:
  None
I also tried to use the USB device directly from within VirtualBox, i.e. Devices -> USB devices -> <adapter name>, but that doesn't seem to work as I get "This device cannot start. (Code 10)".

Perhaps this is not a VirtualBox issue but rather a Windows config issue, not sure. Can somebody point me in the right direction?

Thanks.

Re: Networking breaks on Host when bridged Guest adapter is

Posted: 26. Sep 2013, 22:05
by noteirak
If only the guest is meant to use the adapater, then disable TCP/IP in the host on that device, and you shouldn't have any more problems.

Re: Networking breaks on Host when bridged Guest adapter is

Posted: 27. Sep 2013, 11:21
by dremel
Thanks, that was the solution indeed.

The only item that cannot be unchecked is "VirtualBox Bridged Networking Driver", or you get "Could not start the machine <...> because the following physical network interfaces were not found: <...>".

Re: Networking breaks on Host when bridged Guest adapter is

Posted: 27. Sep 2013, 12:42
by noteirak
Yes, that item is the one which is responsible for doing the bridging, so if you remove it, you'll disable bridging on that interface, and the VM will fail to start since it cannot be bridged.