Unable to bridge WIFI

Discussions related to using VirtualBox on Windows hosts.

Unable to bridge WIFI

Postby bostjanc » 30. Sep 2017, 16:05

Hi guys.

HOST: win 10 x64 (1703)
GUEST: win 10 x64 (1703)
Virtual box version: 5.1.28 r117968 (Qt5.6.2)

NAT network works, but I just can't make it work brigged connection on WIFI host.



What am I missing?
I have installed virtualbox guest files on vm.
I have changed network bridge adapter on vm promiscuous mode to allow vms.
On host WIFI connection I have went to properties and selected share this network with virtualbox host nic.

Any other suggestions what can I do to make it work as bridged connection?

With bet regards
Attachments
vbox.png
vbox.png (98.8 KiB) Viewed 28213 times
bostjanc
 
Posts: 2
Joined: 30. Sep 2017, 15:46

Re: Unable to bridge WIFI

Postby mpack » 30. Sep 2017, 16:16

I notice you are showing pictures of the host only adapter, which is irrelevant to your question. That adapter is used when the VM is configured for host only networking mode (through which ONLY the host is able to communicate with VMs) - it has nothing to do with bridging to any physical host NIC. You should undo potentially confusing things you tried, like the "share this connection" feature of the host OS.

All that is required to configure bridged networking is to choose bridged networking in the VM network settings, then choose a physical NIC to bridge to. You appear to have done that, though I have no way to verify from here that you chose the correct host NIC.

It would be better if you bridged to a host Ethernet port. Bridging to a wifi port is very dependent on host drivers: a wifi chipset doesn't necessarily expect multiple PCs to share it.
mpack
Site Moderator
 
Posts: 33918
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Unable to bridge WIFI

Postby bostjanc » 2. Oct 2017, 11:45

Hi there.
1st of all thank you for your reply.

"You should undo potentially confusing things you tried, like the "share this connection" feature of the host OS." - DONE (I have undo WIFI connection sharing, because I realized I could not establish on some VPN connections I had after I have shared WIFI)

It would be better if you bridged to a host Ethernet port. Bridging to a wifi port is very dependent on host drivers: a wifi chipset doesn't necessarily expect multiple PCs to share it. - I have newer laptop (ThinkPad T570) and I though teoretically newer WIFI nic's should automatically be capable to bridge connections inside VirtualBox over WIFI.
Computer is also joined to domain, is there a possibility that any group policy would denying bridging over WIFI?
I did everything "by the book" so this are the connection settings for VM:



Thanks for the reply.
with best regards
Attachments
nic.png
nic.png (30.72 KiB) Viewed 28190 times
bostjanc
 
Posts: 2
Joined: 30. Sep 2017, 15:46

Re: Unable to bridge WIFI

Postby mpack » 2. Oct 2017, 12:58

bostjanc wrote:nd I though teoretically newer WIFI nic's should automatically be capable to bridge connections inside VirtualBox over WIFI.

I have not heard that new WiFi chipsets expect to be shared by multiple PCs any more than older chipsets did. I can't really say any more than that.

It is very possible that the network you bridge to might be firewalled against use by unknown PCs. Certainly that is the case where I work. If that's the case for you too then you have to use NAT, or get your IT support people involved, or bridge the VM to a different network (i.e. a wifi connection to your cellphone/mobile data network). Obviously the latter could be a good way to get fired.
mpack
Site Moderator
 
Posts: 33918
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Unable to bridge WIFI

Postby SergioK » 14. Jan 2020, 23:21

I could do it, changing the MAC of the virtual adapter to be the same as the Wifi adapter.

At windows command prompt use ipconfig/all to get the MAC.
On Virtualbox network configuration, select the Wifi adapter and change the MAC to be the same as the real Wifi adapter.

The Virtualbox could get a new IP at the external network and is reusing the already authenticated Wifi session at the real machine.
SergioK
 
Posts: 1
Joined: 14. Jan 2020, 23:09

Re: Unable to bridge WIFI

Postby mpack » 15. Jan 2020, 11:59

SergioK wrote:I could do it, changing the MAC of the virtual adapter to be the same as the Wifi adapter.

Nonsense. That will not fix anything, all it will do is corrupt network DHCP (IP address assignment). A MAC is a unique ID for a node on a local network, I don't know what you hope to accomplish by making it non-unique.
mpack
Site Moderator
 
Posts: 33918
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Unable to bridge WIFI

Postby mvduin » 2. Apr 2020, 07:49

Sorry for replying to an old topic, but this thread was the top google hit for my initial search so now that I've found the actual answer I feel like I should share it here for others to find.

mpack wrote:Bridging to a wifi port is very dependent on host drivers: a wifi chipset doesn't necessarily expect multiple PCs to share it.

This doesn't have anything to do with what the wifi chipset "expects", wifi has fundamentally never supported client-side bridges until (after more than a decade of discussion) the 802.11ak-2018 (aka "General Link") amendment to the 802.11-2016 standard was published. Only if both AP and client implement this amendment (and afaik nobody has implemented it yet) does wifi actually provide the same "MAC service" as Ethernet does (which supports bridging).

So what's the deal with adding a wifi interface to a bridged network in virtualbox? Well, a quick glance at the bridged networking section of the user manual provides the answer: it doesn't actually use bridging. What the manual (rather vaguely) describes is known as "proxy ARP", which means that virtualbox will respond to ARP requests received via wifi for IPs belonging to VMs, so on wifi all VMs will seem to have the same MAC address as the host, as if the host simply has a bunch of IP addresses. Incoming packets are then routed to the correct VM based on destination IP instead of destination MAC.

In short, "bridging" to a wifi interface in virtualbox should just work, regardless of the wifi chipset. It just comes with the caveats that it only supports IPv4 and IPv6, no other layer 2 protocols, and all VMs will (outside of the virtual bridged network) appear to have the same MAC address. If it doesn't work at all then there's probably a configuration mistake, or possibly a bug somewhere.


As a final note, for those curious about why, until 802.11ak is implemented, true bridging to a wifi interface is impossible:

Wifi packets in general have up to four MAC addresses associated with them: the source and destination address (SA and DA), which serve the same purpose as with Ethernet (i.e. identify the packet's originator and ultimate destination(s) on a bridged network), and the transmitter and receiver address (TA and RA) of the station/AP on the wireless medium, which are needed for various wifi-specific reasons including wifi security. Until recently however the only packets that use a full 4-address header were unicasts on a wireless mesh network where each node needs to be able to forward packets on behalf of others. In a normal ("infrastructure") wifi network, client-to-AP packets use a 3-address header that omits SA (which is implicitly equal to TA) and AP-to-client packets use a 3-address header that omits DA (which is implicitly equal to RA). This makes it impossible for the client to transmit or receive packets on behalf of another host that has a separate MAC address.

Now if this were the only issue then it would have been easy enough to just allow 4-address packets to be used more generally. Unfortunately there are much bigger problems having to do with how wifi implements broadcasts and multicasts, and the solution space is complicated with various trade-offs. This is why it has taken such a long time for a solution to finally be standardized.
mvduin
 
Posts: 1
Joined: 2. Apr 2020, 05:38


Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: fth0 and 18 guests