The laptop is running 11.0-CURRENT r275768M with the lagg(4) interface as explained in the FreeBSD Handbook ‘Example 31.3. Failover Mode Between Ethernet and Wireless Interfaces’. In /etc/rc.conf I have added:
# cat /etc/rc.conf | egrep 'ifconfig|wlans|cloned'
ifconfig_lagg0="laggproto failover laggport re0 laggport wlan0 DHCP"
In Virtualbox if I specify in the VM Settings, the network adapter as Bridged Adapter, it works only with the lan cable connected to the laptop.
If I disconnect the cable, the VM network adapter stops working.
Auto-assigned to maintainer vbox@FreeBSD.org
Is this still relevant? No maintainer feedback till now!
(In reply to Walter Schwarzenfeld from comment #2)
> Is this still relevant?
I can confirm this is still relevant in 12.1-RELEASE, at least with a similar setup: em0 (MASTER) / wlan0.
• set up your lagg interface so that em0 is MASTER,ACTIVE
• configure a VM to use lagg0 (possibly instead of em0) as a bridged interface
• launch this VM
• ping an external host from the guest (should be successful)
• execute 'ifconfig em0 down' on the FreeBSD host
• ping an external host from the guest (should not be successful)
• execute 'ifconfig em0 up' on the FreeBSD host
• ping an external host from the guest (should be successful again)
Please also see bug 240746.
The following note might help to understand the issue:
Bridging to a wireless interface is done differently from bridging to a wired interface, because most wireless adapters do not support promiscuous mode. All traffic has to use the MAC address of the host's wireless adapter, and therefore Oracle VM VirtualBox needs to replace the source MAC address in the Ethernet header of an outgoing packet to make sure the reply will be sent to the host interface. When Oracle VM VirtualBox sees an incoming packet with a destination IP address that belongs to one of the virtual machine adapters it replaces the destination MAC address in the Ethernet header with the VM adapter's MAC address and passes it on. Oracle VM VirtualBox examines ARP and DHCP packets in order to learn the IP addresses of virtual machines.