Staging: batman-adv: update README for latest kernel
[firefly-linux-kernel-4.4.55.git] / drivers / staging / batman-adv / README
1 [state: 13-12-2009]
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 It compiles against and should work with Linux 2.6.20 - 2.6.32. Supporting older
19 versions is not planned, but it's probably easy to backport it. If you work on a
20 backport, feel free to contact us.  :-)
21
22 COMPILE
23 -------
24 To compile against your currently installed kernel, just type:
25
26 # make
27
28 if you want to compile against some other kernel, use:
29
30 # make KERNELPATH=/path/to/kernel
31
32 USAGE
33 -----
34
35 insmod the batman-adv.ko in your kernel:
36
37 # insmod batman-adv.ko
38
39 the module is now waiting for activation. You must add some interfaces
40 on which batman can operate. Each interface must be added separately:
41
42 # echo wlan0 > /proc/net/batman-adv/interfaces
43
44 ( # echo wlan1 > /proc/net/batman-adv/interfaces )
45 ( # echo eth0 > /proc/net/batman-adv/interfaces )
46 ( ... )
47
48 Now batman starts broadcasting on this interface.
49 You can now view the table of originators (mesh participants) with:
50
51 # cat /proc/net/batman-adv/originators
52
53 The module will create a new interface "bat0", which can be used as a
54 regular interface:
55
56 # ifconfig bat0 inet 192.168.0.1 up
57 # ping 192.168.0.2
58 ...
59
60 If you want topology visualization, your meshnode must be configured
61 as VIS-server:
62
63 # echo "server" > /proc/net/batman-adv/vis
64
65 Each node is either configured as "server" or as "client" (default:
66 "client"). Clients send their topology data to the server next to them,
67 and server synchronize with other servers. If there is no server
68 configured (default) within the mesh, no topology information will be
69 transmitted. With these "synchronizing servers", there can be 1 or
70 more vis servers sharing the same (or at least very similar) data.
71
72 When configured as server, you can get a topology snapshot of your mesh:
73
74 # cat /proc/net/batman-adv/vis
75
76 This output format is a graphviz formatted text file which can be
77 processed with graphviz-tools like dot.
78 The labels are similar/compatible to the ETX metric, 1.0 means perfect
79 connection (100%), 2.0 means 50%, 3.0 means 33% and so on.
80
81 Alternatively, a JSON output format is available. The format can be set
82 using by writing either "dot_draw" or "json" into the vis_format file.
83 "dot_draw" is selected by default.
84
85 echo "json" > /proc/net/batman-adv/vis_format
86
87 In very mobile scenarios, you might want to adjust the originator
88 interval to a lower value. This will make the mesh more responsive to
89 topology changes, but will also increase the overhead. Please make sure
90 that all nodes in your mesh use the same interval. The default value
91 is 1000 ms (1 second).
92
93 # echo 1000 > /proc/net/batman-adv/orig_interval
94
95 To deactivate batman, do:
96
97 # echo "" > /proc/net/batman-adv/interfaces
98
99 LOGGING/DEBUGGING
100 -----------------
101
102 All error messages, warnings and information messages are sent to the
103 kernel log. Depending on your operating system distribution this can be
104 read in one of a number of ways. Try using the commands: dmesg,
105 logread, or looking in the files /var/log/kern.log or
106 /var/log/syslog. All batman-adv messages are prefixed with
107 "batman-adv:" So to see just these messages try
108
109 dmesg | grep batman-adv
110
111 When investigating problems with your mesh network it is sometimes
112 necessary to see more detail debug messages. This must be enabled when
113 compiling the batman-adv module. When building batman-adv as part of
114 kernel, use "make menuconfig" and enable the option
115 "B.A.T.M.A.N. debugging". When compiling outside of the kernel tree it
116 is necessary to edit the file Makefile.kbuild and uncomment the line
117
118 #EXTRA_CFLAGS += -DCONFIG_BATMAN_ADV_DEBUG
119
120 The additional debug output is by default disabled. It can be enabled
121 either at kernel modules load time or during run time. To enable debug
122 output at module load time, add the module parameter debug=<value>.
123 <value> can take one of four values.
124
125 0 - All debug output disabled
126 1 - Enable messages related to routing / flooding / broadcasting
127 2 - Enable route or hna added / changed / deleted
128 3 - Enable all messages
129
130 e.g.
131
132 modprobe batman-adv debug=2
133
134 will load the module and enable debug messages for when routes or HNAs
135 change.
136
137 The debug output can also be changed at runtime using the file
138 /sys/module/batman-adv/parameters/debug. e.g.
139
140 echo 2 > /sys/module/batman-adv/parameters/debug
141
142 enables debug messages for when routes or HNAs
143
144 The debug output is sent to the kernel logs. So try dmesg, logread etc
145 to see the debug messages.
146
147 BATCTL
148 ------
149
150 B.A.T.M.A.N.  advanced  operates on layer 2 and thus all hosts partici-
151 pating in the virtual switch are completely transparent for all  proto-
152 cols above layer 2. Therefore the common diagnosis tools do not work as
153 expected. To overcome these problems batctl was created. At the  moment
154 the  batctl contains ping, traceroute, tcpdump and interfaces to the
155 kernel module settings.
156
157 For more information, please see the manpage (man batctl).
158
159 batctl is available on http://www.open-mesh.net/
160
161 CONTACT
162 -------
163
164 Please send us comments, experiences, questions, anything :)
165
166 IRC:             #batman on irc.freenode.org
167 Mailing-list:    b.a.t.m.a.n@open-mesh.net
168 (subscription at https://list.open-mesh.net/mm/listinfo/b.a.t.m.a.n )
169
170 You can also contact the Authors:
171
172 Marek Lindner <lindner_marek@yahoo.de>
173 Simon Wunderlich <siwu@hrz.tu-chemnitz.de>