ARP broadcasts when bridging wireless and wired adapters

Discussions related to using VirtualBox on Windows hosts.

ARP broadcasts when bridging wireless and wired adapters

Postby kshiraly » 19. Oct 2011, 09:35

I've noticed a difference in ARP broadcasts and ping behaviour when using virtual adapter bridged to a wifi interface versus one bridged to an ethernet interface.
I could think of one reason why this is. Can somebody here please go through my reasoning and let me know if my understanding is wrong?

Please refer the two attached network diagrams - one where virtual adapter is bridged to a wifi interface, and one where it's bridged to an ethernet interface.

While pinging guest VM IP address from another machine on the network, I monitored ARP traffic on the pinging machine.

When virtual adapter was bridged to a wifi interface:
Virtualbox bridge networking over wireless adapter.png
Virtualbox bridge networking over wireless adapter.png (64.82 KiB) Viewed 4345 times

The ARP broadcast sent by pinging machine received a reply from the Virtualbox host machine IP address (192.168.1.2) with
Sender MAC address=MAC address of wifi adapter (M1) and
Sender IP address=IP address of guest VM (192.168.1.100)
ifconfig in the guest VM shows the virtual adapter's MAC address assigned by Virtualbox, not the physical adapter's.


When virtual adapter was bridged to an ethernet interface:
Virtualbox bridge networking over ethernet adapter.png
Virtualbox bridge networking over ethernet adapter.png (61.01 KiB) Viewed 4341 times

The ARP broadcast sent by pinging machine received a reply from the guest VM IP address (192.168.1.100) with
Sender MAC address=MAC address of guest VM virtual adapter (M2) and
Sender IP address=IP address of guest VM (192.168.1.100)

On the other hand, when pinging the guest VM from its own host machine, the host machine received the virtual adapter MAC address in both configurations.

In all cases, "Promiscuous mode" was set to "Allow All".

So, it looks like when bridged to a wireless adapter, Virtualbox always replies to ARP broadcasts from other machines with the physical adapter's MAC address for all guest VMs. But when bridged to wired adapter, it replies with the respective virtual adapter MAC address.

My reasoning for this difference is that in Windows, most wireless adapter drivers don't support a promiscuous mode. If Virtualbox were to send out virtual adapter MAC addresses, the wireless adapter driver would discard all packets addressesed to virtual adapter MAC addresses and Virtualbox's filter driver would never receive any traffic. So it's forced to send out wireless adapter MAC address for even VM IP addresses. When it receives packets, I suppose it relies on the IP address (since MAC address is always the same) to forward to the right guest VM. Is this reasoning correct?
kshiraly
 
Posts: 2
Joined: 19. Oct 2011, 08:28
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu Server 10.04 64-bit

Re: ARP broadcasts when bridging wireless and wired adapters

Postby BillG » 20. Oct 2011, 02:47

Wireless networking has always been a problem for virtual networking. The standards for wireless networking prohibit promiscuous mode (which the original virtual networking relied on) so you should never see it supported by a driver for a wireless NIC.

Here is an old Microsoft post which may throw some light on the issue.

http://blogs.msdn.com/b/virtual_pc_guy/ ... 79773.aspx
Bill
BillG
Volunteer
 
Posts: 4461
Joined: 19. Sep 2009, 04:44
Location: Sydney, Australia
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 7,8,Server

Re: ARP broadcasts when bridging wireless and wired adapters

Postby kshiraly » 20. Oct 2011, 07:50

Thanks for the reply and that very relevant link, BillG.
In fact, I saw symptoms similar to what the blog states. Intermittent ping failures and weird ARP cache states (VM entries showed "<Incomplete>") from other physical machines and VMs on other machines led me to investigate this issue.
Luckily, bridging to a wired interface solved it in my case, but damn, those wifi adapters looked so convenient at first! Time to bring out the cables, I guess.
kshiraly
 
Posts: 2
Joined: 19. Oct 2011, 08:28
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu Server 10.04 64-bit

Re: ARP broadcasts when bridging wireless and wired adapters

Postby dogganos » 25. Nov 2011, 08:32

Has it always been this way? I have a problem the last few days and the all my VMs on a debian host can't get DHCP from the router. I started investigating and found that DHCP request packets (and generally all the packets) are leaving the host's wifi NIC with the host's MAC address instead of the VM's MAC address, and thought that this could be the problem. So, I can assume that an upgrade recently to the linux driver of the host's NIC broke the system due to the promiscuous mode problem...
dogganos
 
Posts: 3
Joined: 24. Nov 2011, 23:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Debian,Win XP,Ubuntu


Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: JDTBH, scottgus1 and 32 guests