Virtual LibreMesh testbed using for repeatable CI :
- QEMU
- mac80211_hwsim linux module
- vwifi
This project aims at providing an easy, lightweight, repeatable and quick to setup testbed for LibreMesh.
You need to install the qemu-system-x86 and qemu-img components of QEMU. Then you will need to install also tmux.
For this, follow the instructions on this page.
Clone this repository in your OpenWRT build directory :
git clone --recurse-submodules https://github.com/VGDSpehar/libremesh-virtual-mesh.gitFor this testbed to work, you'll need :
- x86-64 target (follow these instructions specifying
x86as Target System andx86_64as Subtarget) - Adding the vwifi-client package to your OpenWRT build feeds :
echo 'src-git vwifi https://github.com/javierbrk/vwifi_cli_package' >> feeds.conf
./scripts/feeds update -a
./scripts/feeds install -aRunning make menuconfig you should now be able to select "Network > vwifi" for your build configuration.
Select it, make sure your target is x86-64 then compile your LibreMesh firmware
make -j$(($(nproc)+1))Follow the instructions from the repository in order to have vwifi-server.
From your OpenWRT build directory
./libremesh-virtual-mesh/start-mesh.shthen a tmux window should open with 5 different panes. From top left to bottom : 0. vwifi-server : this is the server that will relay the wifi frames across each virtual machines
- LiMe-000001 listening on port 2201
- LiMe-000002 listening on port 2202
- LiMe-000003 listening on port 2203
- A standard shell that will help you setup/monitor the mesh
It is possible to add another VM in order to test/monitor the mesh.
Simply open a new pane, and launch ./libremesh-virtual-mesh/launch-monitoring-vm.sh
Then set the VM with :
setup-vm.sh 2204
In this monitoring VM (or in any other VM) you should be able to observe the mesh topology of the setup :
shared-state-async get wifi_links_info
You'll see that each VM is connected to the others on their wlan0-mesh interface, forming a mesh.