No networking in Windows 7 / 10 guest

Discussions about using Windows guests in VirtualBox.
Post Reply
SpaceDandy
Posts: 2
Joined: 4. Jul 2019, 13:09

No networking in Windows 7 / 10 guest

Post by SpaceDandy »

I have a problem with Windows 7 and 10 guests having no network functionality. This has happened sometime in the last couple of months, since I last used Windows. I am running VirtualBox 6.0.8 on Mac OS 10.14.5 host (MacBook Pro 2018 15").

I am using a bridged network adaptor with the guests. Both Windows and VirtualBox report that the guest has correctly obtained an IP address and gateway from the DHCP router, however there is no further connectivity -- I cannot ping inside or outside of the local network. I have tried a NAT adaptor and also using Ethernet and WiFi host adaptors with the bridging driver to no avail.

[Edit: it seems that it is due to bridging the WiFi host adaptor. Changing the adaptor on the fly doesn't resolve the issue, but cold booting with a different adaptor restores connectivity.]

I created a new VM with a fresh version of Windows 7 to check that is isn't something obviously wrong with the guest and that also has the problem. I attach the config file and log file of a session run from cold boot, in case it helps. This only seems relevant to Windows 7 and 10; Windows XP and Linux guests work fine.

Has anybody else seen this?
Attachments
Windows 7.vbox.zip
(1.89 KiB) Downloaded 20 times
VBox.log.zip
(29.95 KiB) Downloaded 16 times
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: No networking in Windows 7 / 10 guest

Post by socratis »

SpaceDandy wrote:Has anybody else seen this?
Yes, plenty! ;)
Bridged over 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. 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.

And here's a more technical explanation, pay special attention to the last paragraph:
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.
SpaceDandy
Posts: 2
Joined: 4. Jul 2019, 13:09

Re: No networking in Windows 7 / 10 guest

Post by SpaceDandy »

socratis wrote:
SpaceDandy wrote:Has anybody else seen this?
Yes, plenty! ;)
Bridged over 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. 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.
Thanks, that's interesting. However I note that the information you've highlighted suggests that success is dependent on hardware combination, which is not what I'm seeing here. I'm seeing different results based on Guest OS: Windows XP and various flavours of Linux all work fine, but Windows 7 & 10 do not work. All guests work when bridging wired ethernet connection.
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: No networking in Windows 7 / 10 guest

Post by socratis »

As I said, it might or might not work. I don't have a PhD in TCP/IP packets unfortunately... ;)
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.
Post Reply