Win7 Host, Win7 guest, DHCP not working on Bridged Network?

Discussions about using Windows guests in VirtualBox.
Post Reply
GMiller
Posts: 16
Joined: 17. Mar 2017, 23:10

Win7 Host, Win7 guest, DHCP not working on Bridged Network?

Post by GMiller »

Hello,

I have a Window 7 64Bit Host and a Win7 64bit Guest. I have this same configuration running on a few laptops. One in particular will not get an IP Address from the DHCP server (OVB 5.1.12). I am using the WiFi adapter (Intel(R) Centrino(R) Ultimate-N 6300 AGN) and the same on another laptop that works fine. I have both laptop setup the same (Network > Bridged Adapter, Name: my wifi adapter above, Intel Pro/1000 MT Desktop(82540EM), Deny, cable connected checked). I have changed the MAC, verified I have plenty of DHCP IPs available.

The one thing I will say I see is different, is on the laptop that works, it has ONE 'Microsoft Virtual WiFi Miniport Adapter' and the laptop that does not work has TWO.

When I tried 'ipconfig /renew' I get a message saying;

An error occurred while renewing interface Local Area Connection : The DHCP client has obtained an IP address that is currently in use on the network. The local interface will be disabled until the DHCP client can obtain a new address.

I have also seen this msg;

Windows has detected an IP address conflict. Another computer on this network has the same IP address as this computer ...

I get it, duplicate IP's are not allowed, thing is, this is from my home and there is nothing else on this network really. I tried changing the MAC in OVB Network config with same results.

I cannot figure out why, on this laptop its not getting its own IP Address.

Need help....LOG files? sniffer help?

Any ideas?
GMiller
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: Win7 Host, Win7 guest, DHCP not working on Bridged Network?

Post by socratis »

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. 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.

For a more technical description (I haven't personally tested the last paragraph's workaround):
vushakov in ticket [url=https://www.virtualbox.org/ticket/10019#comment:18]10019:19[/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.
GMiller
Posts: 16
Joined: 17. Mar 2017, 23:10

Re: Win7 Host, Win7 guest, DHCP not working on Bridged Network?

Post by GMiller »

Thank you for the response.
I have tested Fixed IP, no luck, I have tested using another wifi network, no luck. Next I will try ethr card, but, starting to think its something with this laptop as I have another one the same that does work. Everything I check looks correct compared to my good running laptop.

To summarize this problem, the message I see is;

'Windows has detected an IP address conflict. Another computer on this network has the same IP address as this computer'

and;

I noticed that my vpn(cisco anyconnect) drops/reconnects on my host windows 7 machine when I launch OVB VM.

Its sounds like some kind of conflict between the OBV VM and my host.

I am not sure what I can give you to debug this problem....let me know :)

Thank you
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: Win7 Host, Win7 guest, DHCP not working on Bridged Network?

Post by socratis »

GMiller wrote:I have changed the MAC
To what? And why?
GMiller wrote:'Microsoft Virtual WiFi Miniport Adapter' and the laptop that does not work has TWO.
Have you tried deleting them and scan the hardware for changes from the Device Manager?
GMiller wrote:When I tried 'ipconfig /renew' I get a message saying; An error occurred while renewing interface Local Area Connection
You run the command on the host or on the guest?

I believe that you might have an issue with the host and VirtualBox gets confused. If you click on the drop-down menu for the "Name:" in the Bridged options, do you get two WiFi cards?

Have you tried to Bridge the network adapter to a wired card?
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.
GMiller
Posts: 16
Joined: 17. Mar 2017, 23:10

Re: Win7 Host, Win7 guest, DHCP not working on Bridged Network?

Post by GMiller »

I finally found the answer to my problem and thought I would share it with others. Although I have VirtualBox running on many laptops, only a few were giving me problems running in Bridged mode. My problem ended up being McAfee HIPS 7.x. I found a hit online saying VM bridges will not work if you were using McAfee HIPS 7.x (NAT will work, bridged will not). You must be at a minimum of HIPS 8.0. So, when I checked what HIPS I was running on failing laptops, sure enough, the were both HIPS 7.0. So, I upgraded them to HIPS 8.0 and problem solved.

Hope this will help others.

:)
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: Win7 Host, Win7 guest, DHCP not working on Bridged Network?

Post by socratis »

Thanks for sharing. We'll keep it in mind...

Although, I'd be amiss if I weren't to mention that you could have mentioned that you're using system-wide modifying software, especially in the area that you had the problem ;)
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