Skip to content

VGDSpehar/libremesh-virtual-mesh

Repository files navigation

libremesh-virtual-mesh

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.

Setup

Install dependencies

You need to install the qemu-system-x86 and qemu-img components of QEMU. Then you will need to install also tmux.

Clone OpenWrt

For this, follow the instructions on this page.

Clone this repository

Clone this repository in your OpenWRT build directory :

git clone --recurse-submodules https://github.com/VGDSpehar/libremesh-virtual-mesh.git

Compiling LibreMesh with vwifi :

For this testbed to work, you'll need :

  1. x86-64 target (follow these instructions specifying x86 as Target System and x86_64 as Subtarget)
  2. 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 -a

Running 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))

Vwifi-server

Follow the instructions from the repository in order to have vwifi-server.

Running the virtual mesh

From your OpenWRT build directory

./libremesh-virtual-mesh/start-mesh.sh

then 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

  1. LiMe-000001 listening on port 2201
  2. LiMe-000002 listening on port 2202
  3. LiMe-000003 listening on port 2203
  4. A standard shell that will help you setup/monitor the mesh

Monitoring and testing

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.

About

Virtual Wi-Fi mesh for Libremesh

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages