1

I want to create a bridged connection in qemu/kvm. What I want to do is connect the wifi to a bridge (as a slave), then use this bridge to provide network access to the VM. Using nmtui, I deleted my wifi connection, then created a new bridge and added the wifi to it as a slave. Doesn't work. On the other hand, If I add a wired connection as a slave to the bridge, the bridge gets an IPv4 address, and the VM gets an IP in the same network. I also tried configuring the slave wifi as "access point" (instead of client), which didn't help.

Now I'm pretty sure someone will say that the bridge requires promiscuous mode and you can't connect a wifi to a wired connection, which is what you have on the VM side, and it requires support from the wifi drivers and bla bla bla. It can work, somehow. I can easily get a bridged network in VirtualBox.

Matan L.
  • 111
  • 2
  • Some wireless AP do not like when there are other MACs than MAC of associated wireless client. BTW to use bridge means you need to have your VMs visible in the network on layer 2 (OSI). Do you really need that? – Jiri B Apr 02 '21 at 07:57
  • If I want to access my VM from another (physical) computer on the network, what other choice do I have? Port forwarding? Bridge is so much simpler... – Matan L. Apr 02 '21 at 11:02
  • This can (only) work when being either the AP or having both the AP and the STA (the VM's host) set in WDS or 4addr mode. See these 2 Q/As from NE SE: https://networkengineering.stackexchange.com/questions/25100/four-layer-2-addresses-in-802-11-frame-header , and (answer of mine) from UL SE: https://unix.stackexchange.com/questions/554331/theoretical-tap-interface-w-wifi-parent-interface/555676#555676 . My guess is that Virtualbox if making this work is using the ipvlan/ipvtap approach, also maybe mingled with ARP interception. – A.B Apr 02 '21 at 11:54
  • *If I want to access my VM from another (physical) computer on the network, what other choice do I have? Port forwarding? Bridge is so much simpler...* - with this logic the internet would be one big LAN :) What about routing? – Jiri B Apr 02 '21 at 17:27
  • Thanks for the ideas. A.B. - thanks for the useful links! – Matan L. Apr 03 '21 at 16:20

0 Answers0