1

I'm exploring wifi virtualization with qemu running Linux. I am attempting to accomplish the following setup

  • The access point runs inside the first qemu instance with mac80211_hwsim simulated radio and hostapd stack
  • The station runs in the second qemu instance with mac80211_hwsim simulated radio and wpa_supplicant stack
  • The station in second VM must be able to associate with the access point in the first VM

What I have already set up:

  • The first qemu VM generates the simulated radio and starts the access point with hostapd. It sends beacon frames periodically as monitored on the hwsim0 interface with tcpdump utility
  • The second qemu VM also sets up the wlan0 interface as station with wpa_supplicant configuration and sends probe requests as monitored on hwsim0 interface
  • Both VMs are connected on a bridge with tap interfaces on the host (tap0 and tap1) and can ping each other and the host from the ethernet interface

What I tried so far:

  • Forwarding traffic from hwsim and wlan interface to the ethernet interface so that it can reach the other VM using iptables rules. Didn't work with various combinations
  • Bridging eth0 and wlan interface on the access point VM (Enslaved eth0 on br0 bridge, wlan0 by done by hostapd itself). Didn't work either

Please keep in mind that we are not just talking about different namespaces here but 2 completely different VMs which are trying to associate with each other as AP and station. I know that using namespaces we can easily achieve this and I've tried that as well. You can also suggest some other solutions if this isn't the right approach to the problem I am trying to solve.

1 Answer 1

0

did you try vwifi project?

vwifi: Simulate Wi-Fi (802.11) between Linux Virtual Machines on Qemu/VirtualBox/...

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.