Configurations

Common settings

HOSTNAME="@PARAM1@"
SUFFIX="@PARAM2@"
PROTOCOL="@PARAM3@"

CHANNEL="11"
ESSID="WBMv5-Test-Net"
BSSID="02:02:BA:77:13:05"
IF="radio0"
#IF="wifi0"

sysctl -w kernel.hostname=$HOSTNAME
uci set system.@system[0].hostname=$HOSTNAME

uci set network.blan=interface
uci set network.blan.proto=none
uci set network.blan.ipaddr=10.10.100.$SUFFIX
uci set network.blan.netmask=255.255.255.0
uci set network.blan.ip6addr=fd02:0:0:100::${SUFFIX}/64

uci set network.wlan=interface
uci set network.wlan.proto=none
uci set network.wlan.ipaddr=10.10.100.$SUFFIX
uci set network.wlan.netmask=255.255.255.0
uci set network.wlan.ip6addr=fd02:0:0:100::${SUFFIX}/64
uci set network.wlan.mtu=1528

uci set network.zlan=alias
uci set network.zlan.interface=lan
uci set network.zlan.proto=static
uci set network.zlan.ipaddr=10.10.99.$SUFFIX
uci set network.zlan.netmask=255.255.255.0
uci set network.zlan.ip6addr=fd02:0:0:99::${SUFFIX}/64

uci set wireless.$IF.channel=$CHANNEL
uci set wireless.$IF.disabled=0
uci set wireless.$IF.hwmode=11g
uci set wireless.$IF.htmode=NOHT
#uci set wireless.$IF.txpower=20

uci set wireless.@wifi-iface[0].network=wlan
uci set wireless.@wifi-iface[0].mode=adhoc
uci set wireless.@wifi-iface[0].encryption=none
uci set wireless.@wifi-iface[0].bssid=$BSSID
uci delete wireless.@wifi-iface[0].rate=54M
uci delete wireless.@wifi-iface[0].mcast_rate=6000

if [ "$PROTOCOL" = "80211s" ]; then

uci set wireless.@wifi-iface[0].mode="mesh"
uci set wireless.@wifi-iface[0].mesh_id="mesh80211s"
uci delete wireless.@wifi-iface[0].ssid

else

uci set wireless.@wifi-iface[0].mode=adhoc
uci set wireless.@wifi-iface[0].ssid=$ESSID

fi

BABEL

uci set network.blan.proto=none
uci set network.wlan.proto=static

uci set babeld.wlan=interface
uci set babeld.wlan.ignore=false

uci set babeld.filter1=filter
uci set babeld.filter1.type=redistribute
uci set babeld.filter1.local=true
uci set babeld.filter1.ip='10.10.100.0/24'
uci set babeld.filter1.action=allow

uci set babeld.filter2=filter
uci set babeld.filter2.type=redistribute
uci set babeld.filter2.local=true
uci set babeld.filter2.ip='fdba:1943:e753::/64'
uci set babeld.filter2.action=allow

uci set babeld.filter3=filter
uci set babeld.filter3.type=redistribute
uci set babeld.filter3.local=true
uci set babeld.filter3.action=deny

uci set babeld.filter4=filter
uci set babeld.filter4.type=in
uci set babeld.filter4.ip='10.10.100.0/24'
uci set babeld.filter4.action=allow

uci set babeld.filter5=filter
uci set babeld.filter5.type=in
uci set babeld.filter5.ip='fdba:1943:e753::/64'
uci set babeld.filter5.action=allow

uci set babeld.filter6=filter
uci set babeld.filter6.type=in
uci set babeld.filter6.action=deny

BATMAN

uci set network.blan.proto=none
uci set network.wlan.proto=static

uci set batmand.general.interface=$(uci get -p /var/state wireless.@wifi-iface[0].ifname)

BATMAN Advanced

uci set network.blan.proto=static
uci set network.wlan.proto=none

uci set batman-adv.bat0.interfaces=wlan0

BMX

uci set network.blan.proto=none
uci set network.wlan.proto=static

uci set bmx6.@dev[0].dev=$(uci get -p /var/state wireless.@wifi-iface[0].ifname)

OLSR

uci set network.blan.proto=none
uci set network.wlan.proto=static

rm -f /etc/config/olsrd
touch /etc/config/olsrd
uci add olsrd olsrd
uci set olsrd.@olsrd[0].IpVersion=4
uci set olsrd.@olsrd[0].DebugLevel=0
uci add olsrd LoadPlugin
uci set olsrd.@LoadPlugin[0]=LoadPlugin
uci set olsrd.@LoadPlugin[0].library=olsrd_txtinfo.so.0.1
uci set olsrd.@LoadPlugin[0].accept="0.0.0.0"
uci set olsrd.@LoadPlugin[0].port="10001"
uci add olsrd Interface
uci set olsrd.@Interface[0]=Interface
uci set olsrd.@Interface[0].interface=wlan
uci set olsrd.@Interface[0].Ip4Broadcast=10.10.100.255

BattleMeshV5/Configurations (last edited 2012-03-30 15:02:53 by Nico)