6. 6LoWPAN

6LoWPAN is supported by Mininet-WiFi thanks to the `fakelb` and `mac802154_hwsim` modules. Both modules have been developed to support 6lowpan, but `mac802154_hwsim` (which is supported from Linux Kernel version 4.18) is gradually replacing fakelb.

You can find an example for 6LoWPAN at examples/6LoWPan.py. However, you first need to install `iwpan` tool with:

~/mininet-wifi$ sudo util/install.sh -6

6LoWPan.py consists of three sensors and you can interact with these nodes in the same fashion as stations and hosts. For example:

~/mininet-wifi$ sudo python examples/6LoWpan.py
mininet-wifi> sensor1 ping6 -c1 2001::2
PING 2001::2(2001::2) 56 data bytes
64 bytes from 2001::2: icmp_seq=1 ttl=64 time=0.221 ms

--- 2001::2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.221/0.221/0.221/0.000 ms

You can also use iwpan tool:

mininet-wifi> sensor1 iwpan dev sensor1-wpan0 info
Interface sensor1-wpan0
    ifindex 5
    wpan_dev 0x2
    extended_addr 0x466abb26bbd7f534
    short_addr 0xffff
    pan_id 0xbeef
    type node
    max_frame_retries 3
    min_be 3
    max_be 5
    max_csma_backoffs 4
    lbt 0
    ackreq_default 0

Alternatively, you can –help for more more information about the features supported by iwpan.

mininet-wifi> sensor1 iwpan --help

Warning

This 6lowpan implementation still lacks of a solution like wmediumd (originally developed by bcopeland and adapted to Mininet-WiFi by patgrosse) for a perfect wireless medium simulation. The most important impact on this is related to the position of the nodes and the received signal. In other words, `mac802154_hwsim` will not be able to recognized the position of the nodes.

Demo Video

https://www.youtube.com/watch?v=LKTMiUyB6Lk