Difference between revisions of "Mesh/BATMAN-adv"
Line 9: | Line 9: | ||
option type 'mac80211' | option type 'mac80211' | ||
option hwmode '11g' | option hwmode '11g' | ||
option channel '3' | option channel '3' # You may want another channel | ||
option disabled '0' | option disabled '0' | ||
option phy 'phy0' | option phy 'phy0' | ||
Line 20: | Line 20: | ||
option network 'lan' | option network 'lan' | ||
option mode 'ap' | option mode 'ap' | ||
option ssid 'sudomesh' | option ssid 'sudomesh' # You should change the ssid to be unique | ||
# the mesh interface | # the mesh interface | ||
Line 30: | Line 30: | ||
option mode 'adhoc' | option mode 'adhoc' | ||
option bssid 'CA:FE:C0:DE:F0:0D' | option bssid 'CA:FE:C0:DE:F0:0D' | ||
option ssid 'sudomesh-backchannel' | option ssid 'sudomesh-backchannel' # You should change the ssid to be unique | ||
</pre> | </pre> | ||
Revision as of 23:03, 18 July 2013
These notes are valid for OpenWrt 12.09 (Attitude Adjustment), which uses BATMAN 2012.4.0. In newer versions, the version of BATMAN used is 2013.0.0 and the syntax for configuring BATMAN differs slightly. See this page on open-mesh.org for more info.
Wireless configuration
In /etc/config/wireless:
config wifi-device 'radio0' option type 'mac80211' option hwmode '11g' option channel '3' # You may want another channel option disabled '0' option phy 'phy0' # the interface where non-mesh nodes connect config wifi-iface option device 'radio0' option ifname 'ap0' option encryption 'none' option network 'lan' option mode 'ap' option ssid 'sudomesh' # You should change the ssid to be unique # the mesh interface config wifi-iface option device 'radio0' option ifname 'adhoc0' option encryption 'none' option network 'mesh' option mode 'adhoc' option bssid 'CA:FE:C0:DE:F0:0D' option ssid 'sudomesh-backchannel' # You should change the ssid to be unique
Network configuration
In /etc/config/network:
config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' # set up ethernet bridging between eth0 and bat0 # this means that packets can move between the ethernet port # and the wifi mesh config interface 'lan' option type 'bridge' option proto 'static' option ipaddr '10.42.10.11' # this should be a unique IP option netmask '255.255.0.0' option dns '208.67.222.222' option gateway '192.168.1.1' # an internet gateway, not sure how to deal with multiple gateways yet option ifname 'eth0 bat0' # the mesh interface config interface 'mesh' option ifname 'adhoc0' option proto 'none' option mtu '1528'
BATMAN configuration
In /etc/config/batman-adv:
config mesh 'bat0' option interfaces 'adhoc0' # the interface for which to enable batman0 option 'aggregated_ogms' # no idea what this means option 'ap_isolation' # no idea what this means
System configuration
In /etc/config/system you can set hostname and timezone. This is not strictly necessary for BATMAN to work, but it should be set correctly. The below timezone is correct for the pacific U.S. timezone. The naming convention for hostnames is: <router-model-name>-<some-unique-name-you-choose>
config system option hostname tl-wr703n-foo option timezone PST8PDT,M3.2.0,M11.1.0
You may also have to turn off dnsmasq. (someone else can chime in if this contradicts their working knowledge)
/etc/init.d/dnsmasq disable
Testing
You should see the 'sudomesh' and 'sudomesh-backchannel' wifi interfaces when running `sudo iwlist wlan0 scan`