So I have a (Ubuntu 22.04) VirtualBox VM with a “bridged adapter” bridged together with the (Windows 11) host’s ethernet interface (an Intel I219-LM).
The Story
The VM couldn’t acquire an IPv4-address through DHCP, so I checked the logs on my DHCP server. The log shows the server did pick up a DHCP Discover packet broadcast by the VM. It also shows the server sent a DHCP Offer in response.
For further troubleshooting I fired up WireShark on the host and while I could see the outgoing DHCP Discover packet from the VM, I couldn’t see the subsequent DHCP Offer. Skipping over a few hours of head-scratching, I eventually noticed WireShark hadn’t put the interface into promiscuous mode.
I had to turn off the VM in order for WireShark to be able to put the interface into promiscuous mode. If I then started up the VM again, it acquired an IP right away and I could see the whole exchange in WireShark.
Now, I don’t want to keep WireShark running all the time, so I tried to force the interface into promiscuous mode through the command-line, but I ran into the exact same issue as this guy.
If I think it through for a second, it seems kind of logical that promiscuous mode would have to be enabled on the host’s interface. The thing is that I’ve never had to do this manually in the past, nor is it clearly documented what one should do if the interface doesn’t automatically go into promiscuous mode.
The Question(s)
-
Is it correct that promiscuous mode HAS to be enabled on the host interface in order for “Bridged Adapters” to work in VirtualBox VM’s?
-
If so, does this usually happen automatically?
-
If so, what is to blame for it not doing so, the Intel NIC, VirtualBox or Windows 11? (so I know who to escalate this to)
-
How do I force my NIC into promiscuous mode? Clearly WireShark can, so why can’t I?
-
Why can’t I force my NIC into promiscuous mode AFTER the VM’s are started and running.