About Mininet Wifi - nps-ros2/mininet_testbed GitHub Wiki

Mininet-Wifi resources

Mininet-Wifi is a fork from Mininet, see About Mininet.

From the Mininet WiFi UM

The Mininet-WiFi fork of Mininet adds virtualized WiFi stations and access points based on Linux drivers and the 80211_hwsim wireless simulation driver. It also emulates mobility.

In particular, Mininet WiFi offers Mobility Models and Propagation Models (TC Tool, WMediumd)

APIs support Stations and Access Points. Stations connect to access points through authentication and association. Access Point control includes SSID, channel, mode, password, cryptography.

Wireless Medium emulation (Section 1.5): TC, WMediumd

  • TC - Traffic Control: Linux Kernel packet scheduler: shaping (rate), scheduling, policing, dropping. We use these to regulate bandwidth, loss, latency, delay. We can use net.setChannelEquation(...) to set bandwidth, loss, delay, latency. These equations don't work for nodes in motion.
  • Wmediumd - Wireless medium simulator, a Linux wmediumd command-line tool. Wmediumd is preferable to TC for WiFi because:
    • Isoltes WiFi interfaces.
    • Implements backoff algorithm (TC just uses FIFO)
    • Evokes association based on signal level.
    • QoS values are more accurately simulated.

Mobility models

RandomWalk,TruncatedLevyWalk,RandomDirection,RandomWayPoint,GaussMarkov,ReferencePont, timeVariantCommunity.

Propagation models

Friis Propagation Loss Model, Log-Distance Propagation Loss Model (DEFAULT ONE), Log-Normal Shadowing Propagation Loss Model, International Telecommunication Union (ITU) Propagation Loss Model and Two-Ray Ground Propagation Loss Model.

Installing mininet-wifi

Install mininet-wifi from source from its repository at https://github.com/intrig-unicamp/mininet-wifi. Install v2.4.3 or from master. v2.5 is currently not available. mininet or other versions of mininet-wifi must be installed before installing mininet-wifi. To install v2.4.3:

mkdir gits
cd gits
git clone https://github.com/intrig-unicamp/mininet-wifi
cd mininet-wifi
git checkout v2.4.3
sudo util/install.sh -Wlnfv

To check the version installed type mn --version.

Uninstalling mininet-wifi

From https://github.com/mininet/mininet/wiki/FAQ#assign-macs:

sudo rm -rf /usr/local/bin/mn /usr/local/bin/mnexec \
/usr/local/lib/python*/*/*mininet* \
/usr/local/bin/ovs-* /usr/local/sbin/ovs-*

and

sudo apt-get remove mininet openvswitch-switch

Also remove or rename the ~/git/mininet-wifi repository rather than using checkout to rebuild from this; previously built content makes the rebuild break.

And remove other repositories installed adjacent to gits that mininet-wifi places there, in particular openflow.

miniedit

When using mininet-wifi miniedit you will likely want to make adjustments to the WiFi configuration that cannot be done using the miniedit GUI such as changing the Wifi protocol, adjusting the signal strength, or defining the mobility model. Please consult the Mininet-WiFi User Manual: https://usermanual.wiki/Pdf/mininetwifidraftmanual.297704656/view. For example to add mobility, see Sections 2.2 and 5.6. For usage examples please see the mininet-wifi examples at ~/gits/mininet-wifi/examples.

mininet-wifi experimentation

In previous performance tests, we were observing excessive latency during packet transmissioin. When we switched to configuring networks using the miniedit GUI, latency reduced significantly from 17 ms to 1.6 ms. It turns out previous tests configured the 802.11 High Through capacity mode to "HT40+" for links because the Ad-hoc Wifi example for mininet-wifi v2.4.3 at examples/adhoc.py did this. The default miniedit configuration does not make this setting. HT40+ is a High Throughput 40MHz bandwidth configuration introduced in the 802.11n standard. A discussion on this mode is available at http://rfmw.em.keysight.com/wireless/helpfiles/89600b/webhelp/subsystems/wlan-mimo/Content/mimo_80211n_overview.htm

With HT40+ setting:

plots/with_ht40_latency_points.png

Without HT40+ setting:

plots/without_ht40_latency_points.png

Mininet-WiFi Hang

When running mininet-WiFi v2.4.3 with 50 Wifi nodes, Mininet-WiFi hung, likely at R1 which was running Wireshark. Attempts to close Wireshark hung. Attempts to close the runner hung and attempts to clean up via sudo mn -c indicated:

*** Killing mac80211_hwsim
rmmod: ERROR: Module mac80211_hwsim is in use

Attempts to re-start a new runner hung. System shutdown failed on each wlan0: No active IBSS STAs - trying to scan for other IBSS networks with same SSID (merge) and A stop job is running for WPA supplicant. Restart cleared the broken state.