Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / drivers / staging / batman-adv / README
1 [state: 06-01-2010]
2
3 BATMAN-ADV
4 ----------
5
6 Batman-advanced is a new approach to wireless networking which does no longer
7 operate on the IP basis. Unlike B.A.T.M.A.N, which exchanges information
8 using UDP packets and sets routing tables, batman-advanced operates on ISO/OSI
9 Layer 2 only and uses and routes (or better: bridges) Ethernet Frames. It
10 emulates a virtual network switch of all nodes participating. Therefore all
11 nodes appear to be link local, thus all higher operating protocols won't be
12 affected by any changes within the network. You can run almost any protocol
13 above B.A.T.M.A.N. Advanced, prominent examples are: IPv4, IPv6, DHCP, IPX.
14
15 This is batman-advanced implemented as Linux kernel driver. It does not depend
16 on any network (other) driver, and can be used on wifi as well as ethernet,
17 vpn, etc ... (anything with ethernet-style layer 2).
18
19 USAGE
20 -----
21
22 insmod the batman-adv.ko in your kernel:
23
24 # insmod batman-adv.ko
25
26 the module is now waiting for activation. You must add some interfaces
27 on which batman can operate. Each interface must be added separately:
28
29 # echo wlan0 > /proc/net/batman-adv/interfaces
30
31 ( # echo wlan1 > /proc/net/batman-adv/interfaces )
32 ( # echo eth0 > /proc/net/batman-adv/interfaces )
33 ( ... )
34
35 Now batman starts broadcasting on this interface.
36 You can now view the table of originators (mesh participants) with:
37
38 # cat /proc/net/batman-adv/originators
39
40 The module will create a new interface "bat0", which can be used as a
41 regular interface:
42
43 # ifconfig bat0 inet 192.168.0.1 up
44 # ping 192.168.0.2
45 ...
46
47 If you want topology visualization, your meshnode must be configured
48 as VIS-server:
49
50 # echo "server" > /proc/net/batman-adv/vis
51
52 Each node is either configured as "server" or as "client" (default:
53 "client"). Clients send their topology data to the server next to them,
54 and server synchronize with other servers. If there is no server
55 configured (default) within the mesh, no topology information will be
56 transmitted. With these "synchronizing servers", there can be 1 or
57 more vis servers sharing the same (or at least very similar) data.
58
59 When configured as server, you can get a topology snapshot of your mesh:
60
61 # cat /proc/net/batman-adv/vis
62
63 The output is in a generic raw format. Use the batctl tool (See below)
64 to convert this to other formats more suitable for graphing, eg
65 graphviz dot, or JSON data-interchange format.
66
67 In very mobile scenarios, you might want to adjust the originator
68 interval to a lower value. This will make the mesh more responsive to
69 topology changes, but will also increase the overhead. Please make sure
70 that all nodes in your mesh use the same interval. The default value
71 is 1000 ms (1 second).
72
73 # echo 1000 > /proc/net/batman-adv/orig_interval
74
75 To deactivate batman, do:
76
77 # echo "" > /proc/net/batman-adv/interfaces
78
79 LOGGING/DEBUGGING
80 -----------------
81
82 All error messages, warnings and information messages are sent to the
83 kernel log. Depending on your operating system distribution this can be
84 read in one of a number of ways. Try using the commands: dmesg,
85 logread, or looking in the files /var/log/kern.log or
86 /var/log/syslog. All batman-adv messages are prefixed with
87 "batman-adv:" So to see just these messages try
88
89 dmesg | grep batman-adv
90
91 When investigating problems with your mesh network it is sometimes
92 necessary to see more detail debug messages. This must be enabled when
93 compiling the batman-adv module. Use "make menuconfig" and enable the
94 option "B.A.T.M.A.N. debugging".
95
96 The additional debug output is by default disabled. It can be enabled
97 either at kernel module load time or during run time. To enable debug
98 output at module load time, add the module parameter debug=<value>.
99 <value> can take one of four values.
100
101 0 - All debug output disabled
102 1 - Enable messages related to routing / flooding / broadcasting
103 2 - Enable route or hna added / changed / deleted
104 3 - Enable all messages
105
106 e.g.
107
108 modprobe batman-adv debug=2
109
110 will load the module and enable debug messages for when routes or HNAs
111 change.
112
113 The debug output can also be changed at runtime using the file
114 /sys/module/batman-adv/parameters/debug. e.g.
115
116 echo 2 > /sys/module/batman-adv/parameters/debug
117
118 enables debug messages for when routes or HNAs
119
120 The debug output is sent to the kernel logs. So try dmesg, logread etc
121 to see the debug messages.
122
123 BATCTL
124 ------
125
126 B.A.T.M.A.N.  advanced operates on layer 2 and thus all hosts
127 participating in the virtual switch are completely transparent for all
128 protocols above layer 2. Therefore the common diagnosis tools do not
129 work as expected. To overcome these problems batctl was created. At
130 the moment the batctl contains ping, traceroute, tcpdump and
131 interfaces to the kernel module settings.
132
133 For more information, please see the manpage (man batctl).
134
135 batctl is available on http://www.open-mesh.net/
136
137 CONTACT
138 -------
139
140 Please send us comments, experiences, questions, anything :)
141
142 IRC:             #batman on irc.freenode.org
143 Mailing-list:    b.a.t.m.a.n@open-mesh.net
144 (subscription at https://list.open-mesh.net/mm/listinfo/b.a.t.m.a.n )
145
146 You can also contact the Authors:
147
148 Marek Lindner <lindner_marek@yahoo.de>
149 Simon Wunderlich <siwu@hrz.tu-chemnitz.de>