ARP broadcasts when bridging wireless and wired adapters
Posted: 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: 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: 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?
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: 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: 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?