Bridged Adapter internet/general connectivity issues

This is for discussing general topics about how to use VirtualBox.
Post Reply
TommyPrep8091
Posts: 4
Joined: 3. May 2017, 21:37

Bridged Adapter internet/general connectivity issues

Post by TommyPrep8091 »

Hi,

One of the biggest challenge I face while using the bridged adapter is connectivity to the internet and also connectivity to any externally connected PC.

Internet Connectivity :
I configured NAT on Virtual box and eth0 got the IP Address and internet connectivity perfectly working.
While I switched to bridged mode there was no DHCP/IP address assignment for eth0 and hence it failed.

Connectivity to External PC again with bridged adapter.
This is THE scenario I am struggling most. (Windows (VBox - Ubuntu)) ----- Linux PC
Even if I configure static IP on eth0 its not working. My Arp packets are not even coming to Windows Wireshark

I have seen quite some videos and forums searching for the answers but not able to solve my Issue.
version - Windows : 8, Virtual Box 5.0.10 r104061, VM : Ubuntu 14.4LTS, Bridged adapter mode for etho.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Bridged Adapter internet/general connectivity issues

Post by socratis »

You forgot to mention if the BridgedMode is over wired or wireless. My gut feeling is the second. In that case...

Bridged and wireless don't always play nice. Bridged networking is outside the WLAN specification. Bridging to wireless is not really bridging. The guest shares the MAC of the host and the host does a sort of MAC-NAT translation based on IP addresses. Promiscuous mode doesn't exist in the official WLAN specifications. It may or may not work. Some combinations of Routers/Access Points, WLAN cards and drivers work, some don't. See: Bridging & Wifi - Supported hardware and add your experience. For example, it works fine in my home, but not in my office. Same laptop, same VM. Try to see if it works either with wired bridged or with NAT.

vushakov in ticket [url=https://www.virtualbox.org/ticket/10019#comment:18]10019:18[/url] wrote: Many wifi routers now try to use unicast link-level destination for broadcast/multicast IP destination. The reasons are explained in http://tools.ietf.org/html/draft-vyncke ... ficient-01 - that is in context of IPv6, but the same logic applies to IPv4 (IPv6 is hit harder since it relies more on multicast). Behavior varies between wifi routers, so you may get bridged setup working with some and not working with others.

If the wifi router that is not working for you just uses unicast delivery for multicast, then 4.3.16 should help (a typical packet capture can be seen in #12207). In this case the host was receiving DHCP replies intended for the guest (broadcast IP, but unicast to host MAC), but was not rewriting MAC address correctly, so the guest was not receiving the packet. If you plug another computer into the wired port of the router to capture DHCP exchange as seen on the wired side, you would see the same DHCP replies sent to ethernet broadcast on the wired connection. So this is just an optimization for wifi that some routers do.

Unfortunately - and this is orthogonal to multicast/unicast issue above - some routers will send DHCP replies to broadcast IP, but to the unicast client MAC address (i.e. guest MAC in this case) fetched from the DHCP request. These packets will never be even seen by the host. I'm afraid the packet captures in comment:14 is an example of that. In the ethernet capture you can see DHCP replies unicast to guest and in the wireless capture you don't see any replies at all. I have one router like this (though it at least uses ethernet broadcast for its DHCP NAKs, so you can see something in the wireless capture :).

This latter kind of routers has problems with DHCP, but usually you can work around it by not using DHCP and using static IP instead. E.g. I cannot connect to that router of mine with DHCP, but if I use static IP in the guest then I get normal connectivity. Yes, this is suboptimal :(, but better than no connectivity if you must use bridged for some reason.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
TommyPrep8091
Posts: 4
Joined: 3. May 2017, 21:37

Re: Bridged Adapter internet/general connectivity issues

Post by TommyPrep8091 »

Its actually Wired Mode....I know its little strange as this is working in most cases....not sure what am I missing
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Bridged Adapter internet/general connectivity issues

Post by BillG »

Perhaps you should tell us more about your network. I presume it does not have a DHCP server if your client using bridged does not get an IP automatically.

Are the machines on the same switch? Does the host communicate normally with the other PC on the network?

In the adapter settings of the physical NIC in the Windows 8 host, is there an entry for VirtualBox NDIS6 Bridged Networking Driver? Is there a checkmark in the box?
Bill
TommyPrep8091
Posts: 4
Joined: 3. May 2017, 21:37

Re: Bridged Adapter internet/general connectivity issues

Post by TommyPrep8091 »

Yes I do not have any DHCP server/client all the IP-Addreses are hard-coded. The Windows Machine and Linux PC are directly connected (no switch). I checked the adapter settings "NDIS6 Bridged Networking Driver" and it was selected.
One more thing I did today just restarted everything and selected the Promiscuous Mode to "Allow All" in Virtual Box. After that I am able to make the connection. I am not sure its the restart or Mode change made the difference.
For now I will keep it under observation and will keep posted.
TommyPrep8091
Posts: 4
Joined: 3. May 2017, 21:37

Re: Bridged Adapter internet/general connectivity issues

Post by TommyPrep8091 »

I lost the connectivity again....this time I closed the all VMs and restarted virtual box and connectivity is restored. Only VM restarting is not solving the issue. It seems something to do with VirtualBox restart... I guess somewhere DHCP is still running which I am missing (even though I hardcoded the IP address in /etc/network/interfaces) ..Will debug it more and update.
Post Reply