Wifi Mesh Networking

This Document Under Testing !

B.A.T.M.A.N. (Better Approach To Mobile Adhoc Networking)
B.A.T.M.A.N. does have elements of classical routing protocols: It detects other B.A.T.M.A.N. nodes and finds the best way (route) to these. It also keeps track of new nodes and informs its neighbours about their existence.
B.A.T.M.A.N counts the originator-messages received and logs which neighbour the message came in through.
Like distance-vector protocols, but unlike link-state protocols, B.A.T.M.A.N does not try to determine the whole way, but, by using the originator-messages, only the package’s first step in the right direction. The data is handed over to the next neighbour in that direction, who in turn uses the same mechanism. This process is repeated until the data reaches its destination.

Konfigurasi Kernel

Network
[*] batmand
Kernel Modules
Network Support
[*] kmod-batgat
[*] kmod-batman-adv
[*] enable batctl

vi /etc/config/batman-adv
config ‘mesh’ ‘bat0’
option ‘interfaces’ ‘wlan0’
option ‘orig_interval’
option ‘log_level’
option ‘aggregated_ogms’
option ‘bonding’
option ‘vis_mode’

vi /etc/config/batmand
config batmand general
option interface                ath0
option hna
option gateway_class
option originator_interval
option preferred_gateway
option routing_class
option visualisation_srv
option policy_routing_script
option disable_client_nat
option disable_aggregation

root@OpenWrt:/# batctl –help
Usage: batctl [options] commands
commands:
interface|if   [add|del iface(s)]       display or modify the interface settings
originators|o                           display the originator table
interval|it    [orig_interval]          display or modify the originator interval (in ms)
loglevel|ll    [level]                  display or modify the log level
log|l                                   read the log produced by the kernel module
translocal|tl                           display the local translation table
transglobal|tg                          display the global translation table
vis_mode|vm    [mode]                   display or modify the status of the VIS server
vis_data|vd    [dot|JSON]               display the VIS data in dot or JSON format
aggregation|ag [0|1]                    display or modify the packet aggregation setting
bonding|b      [0|1]                    display or modify the bonding mode setting

ping|p         <destination>            ping another batman adv host via layer 2
traceroute|tr  <destination>            traceroute another batman adv host via layer 2
tcpdump|td     <interface>              tcpdump layer 2 traffic on the given interface
bisect         <file1> .. <fileN>       analyze given log files for routing stability
options:
-h print this help (or ‘batctl <command> -h’ for the command specific help)
-v print version

root@OpenWrt:/# batmand –help
WARNING: You are using the unstable batman branch. If you are interested in *us!
batmand: unrecognized option `–help’
Usage: batman [options] interface [interface interface]
-a add announced network(s)
-A delete announced network(s)
-b run connection in batch mode
-c connect via unix socket
-d debug level
-g gateway class
-h this help
-H verbose help
-i internal options output
-o originator interval in ms
-p preferred gateway
-r routing class
-s visualization server
-v print version
–policy-routing-script
–disable-client-nat

root@OpenWrt:/# batctl originators
[B.A.T.M.A.N. adv 2010.1.0, MainIF/MAC: wlan0/d8:5d:4c:eb:8b:aa (bat0)]
Originator      last-seen (#/255)           Nexthop [outgoingIF]:   Potential nexthops …
No batman nodes in range …

Leave a comment