User Tools

Site Tools


Routing mesh experiment using 11s and bmx6

In this example the overlay experiment contains two scripts named “” and “”.

The script must be execute once the experiment is deployed by executing the command “sh /root/”. It downloads and install the L3 routing daemon bmx6 and configures two new virtual WiFi interfaces using 802.11s as link layer (forwarding is disabled).

Then the script is executed every 5 minutes to count the number of nodes available in the new network managed by 11s and bmx6. The output is saved in the directory /save

Be aware that we don't touch the management network (radio0 → mgmt0), we don't change channels or anything else which may cause a failure in the management network.

The overlay file can be found here: wibedoverlay_11s_bmx6.tar.gz


### Unicast experiments ###

hostname=$(cat /proc/sys/kernel/hostname)
ip="$(ip addr show dev br-mgmt | grep inet | awk '{print $2}' | cut -d. -f4 | cut -d / -f1 | awk NR==1)"
ip6="$(cat /sys/class/net/br-mgmt/address|cut -d: -f6)"
ids="0 1"

if ! opkg list-installed | grep bmx6; then
	echo "Installing bmx6"
	opkg install

printf "Starting prepare script for $hostname\n"
set -x
for i in $ids; do

	uci set$i.disabled=0
	uci set wireless.mesh$i=wifi-iface

	uci set wireless.mesh$i.mode=mesh
	uci set wireless.mesh$i.mesh_id=wibed
	uci set wireless.mesh$i.mesh_fwding=0
	uci set wireless.mesh$i.ifname=mesh$i
	uci set wireless.mesh$i.device=radio$i
	uci set wireless.mesh$$i
	uci set network.mesh$i=interface
	uci set network.mesh$i.proto=static
	uci set network.mesh$i.ipaddr="1.1.$i.$ip"
	uci set network.mesh$i.netmask=""
	uci set network.mesh$i.ip6addr="2012:0:$i:$ip6::1/64"
	devs="$devs dev=mesh$i"
uci commit wireless
uci commit network
if ! grep bmx6 /etc/rc.local; then
    echo "(while pgrep -f ; do sleep 1; done;
    ulimit -c 20000;
    bmx6 $devs;
    sleep 1;
    bmx6 -c --tunDev main /tun6Address 2012:0:0:$ip6::1/128 /tun4Address 1.1.1.$ip/32;) &" >> /etc/rc.local
if ! grep /etc/crontabs/root; then
	echo '*/5 * * * * sh /root/' >> /etc/crontabs/root

(sleep 15 && reboot) &


for h in $(bmx6 -c originators | awk '{print $3}'); do
	ping6 -c2 $h -w 10
	[ $? -eq 0 ] && c=$(($c+1))
echo $c >> /save/meshnodes.log
wibed/example_mesh.txt · Last modified: 2014/09/12 16:11 by pau