Wiki » Historial » Versió 6
Axel Neumann, 26-08-2012 11:27
1 | 6 | Axel Neumann | {{>toc}} |
---|---|---|---|
2 | 1 | Pau Escrich | |
3 | |||
4 | 6 | Axel Neumann | h1. BMX6 BatMan-eXperimental version 6 |
5 | |||
6 | Bmx6 is a routing protocol for Linux based operating systems. |
||
7 | 1 | Pau Escrich | The following intro provides kind of tutorial to get started. |
8 | 6 | Axel Neumann | |
9 | |||
10 | h1. Install |
||
11 | |||
12 | |||
13 | h2. Requirements |
||
14 | The following tools are needed to obtain, compile, and install bmx6 |
||
15 | * git (debian package: git-core) |
||
16 | * gcc |
||
17 | * make |
||
18 | * uci (just needed for bmx6-config plugin) |
||
19 | |||
20 | |||
21 | |||
22 | h3. Installing uci |
||
23 | |||
24 | uci libs are needed for the bmx6-config plugin. |
||
25 | To install it do: |
||
26 | <pre> |
||
27 | wget http://downloads.openwrt.org/sources/uci-0.7.5.tar.gz |
||
28 | tar xzvf uci-0.7.5.tar.gz |
||
29 | cd uci-0.7.5 |
||
30 | make |
||
31 | sudo make install |
||
32 | </pre> |
||
33 | |||
34 | Depending on your system there happens to be an error during compilation. |
||
35 | Then edit cli.c and change line 465 to: @ char *argv[MAX_ARGS+2]; @ |
||
36 | |||
37 | |||
38 | h2. Downloading |
||
39 | |||
40 | Latest development sources are available from bmx6 git repository |
||
41 | <pre> |
||
42 | git clone git://qmp.cat/bmx6.git |
||
43 | cd bmx6 |
||
44 | </pre> |
||
45 | |||
46 | h2. Compiling and Installing |
||
47 | To only compile the main bmx6 daemon (no bmx6 plugins) |
||
48 | <pre> |
||
49 | make |
||
50 | sudo make install |
||
51 | </pre> |
||
52 | |||
53 | To only compile the main bmx6 daemon and bmx6 plugins |
||
54 | <pre> |
||
55 | make build_all |
||
56 | sudo make install_all |
||
57 | </pre> |
||
58 | |||
59 | |||
60 | h1. Hello Mesh |
||
61 | |||
62 | 3 | Axel Neumann | |
63 | In its most simple configuration, the only required parameter are the interfaces names that should be used for meshing. |
||
64 | The following example starts bmx6 on interface wlan0: |
||
65 | <pre> |
||
66 | 5 | Axel Neumann | root@mlc1001:~# bmx6 dev=wlan0 |
67 | 3 | Axel Neumann | </pre> |
68 | |||
69 | However, to let this simple command work as expected also check the following basic requirements: |
||
70 | |||
71 | * bmx6 must be executed in root context (with super user permissions). If you are not already root prepend all commands with sudo (eg: @ sudo bmx6 dev=wlan0 @ ). |
||
72 | |||
73 | * NO IP address needs to be configured. By default bmx6 assumes IPv6 and autoconfigures an ULA based IPv6 address for each interface. But the interfaces must be UP. The linux ip command can do this for you (eg: @ ip link set wlan0 up @). Also, if you are using a wireless interface, the wireless interface settings must be set correctly so that link-layer connectivity is given with bmx6 daemons running on other nodes (computers). The good old iwconfig command may help to achieve that. For example @ iwconfig wlan0 mode ad-hoc ap 02:ca:ff:ee:ba:be channel 11 essid my-mesh-network @ is a typical configuration for a wireless mesh setup. |
||
74 | |||
75 | * Bmx6 (by default) works in daemon mode, thus continues to work in background. To let it run in foreground specify a debug level with the startup command like: @bmx6 debug=0 dev=bmx6@ . Of course you may need to kill a previously started bmx6 daemon beforehand (@ killall bmx6 @) |
||
76 | |||
77 | 4 | Axel Neumann | If everything went fine bmx6 is running now, searching for neighboring bmx6 daemons via the configured link and coordinates with them to learn about existence-of and routes-to all other bmx6 nodes in the network. |
78 | To access status information of the bmx6 daemon which has just been started, a second bmx6 process can be launched in client mode (with the --connect or -c parameter) to connect to the main bmx6 daemon and retrieve the desired information. |
||
79 | In the following, a few example will be discussed: |
||
80 | <pre> |
||
81 | 5 | Axel Neumann | root@mlc1001:~# bmx6 -c status |
82 | 4 | Axel Neumann | version compatibility codeVersion globalId primaryIp myLocalId uptime cpu nodes |
83 | 1 | Pau Escrich | BMX6-0.1-alpha 16 9 mlc1001.E0F9E33CD42EF2980443 fd66:66:66:0:a2cd:efff:fe10:101 24100101 0:00:56:37 0.3 3 |
84 | </pre> |
||
85 | 5 | Axel Neumann | |
86 | So apart from version, compatibility number, and code, the status reveals the daemon's global and local ID, its primary (self-configured) IPv6 address, the time since when it is running (56 minutes), its current cpu consumption (0.3%) and the total number of learned nodes in the network (including itself). |
||
87 | |||
88 | Typical types of information are: status, interfaces, links, originators, descriptions, tunnels |
||
89 | These required types can be combined, so a more informative case would be: |
||
90 | <pre> |
||
91 | root@mlc1001:~# bmx6 -c status interfaces links originators |
||
92 | status: |
||
93 | version compatibility codeVersion globalId primaryIp myLocalId uptime cpu nodes |
||
94 | BMX6-0.1-alpha 16 9 mlc1001.6480B336E87B8F8DA8D7 fd66:66:66:0:a2cd:efff:fe10:102 8C100101 0:04:14:15 0.7 3 |
||
95 | interfaces: |
||
96 | devName state type rateMin rateMax llocalIp globalIp multicastIp primary |
||
97 | wlan0 UP wireless 6222K 56000K fe80::a2cd:efff:fe10:101/64 fd66:66:66:0:a2cd:efff:fe10:101/64 ff02::2 1 |
||
98 | links: |
||
99 | globalId llocalIp viaDev rxRate txRate bestTxLink routes wantsOgms nbLocalId |
||
100 | mlc1002.4CA9926CF823599148DF fe80::a2cd:efff:fe10:201 wlan0 100 100 1 1 1 3D100201 |
||
101 | mlc1000.2C4BA11B70E50B889B90 fe80::a2cd:efff:fe10:1 wlan0 100 100 1 1 1 DA100001 |
||
102 | originators: |
||
103 | globalId blocked primaryIp routes viaIp viaDev metric lastDesc lastRef |
||
104 | mlc1000.2C4BA11B70E50B889B90 0 fd66:66:66:0:a2cd:efff:fe10:1 1 fe80::a2cd:efff:fe10:1 eth1.12 999M 14925 2 |
||
105 | mlc1001.6480B336E87B8F8DA8D7 0 fd66:66:66:0:a2cd:efff:fe10:101 0 :: --- 128G 14928 0 |
||
106 | mlc1002.4CA9926CF823599148DF 0 fd66:66:66:0:a2cd:efff:fe10:201 1 fe80::a2cd:efff:fe10:201 eth1.12 999M 14928 2 |
||
107 | </pre> |
||
108 | |||
109 | |||
110 | 4 | Axel Neumann | |
111 | |||
112 | |||
113 | 3 | Axel Neumann | |
114 | |||
115 | |||
116 | |||
117 | |||
118 | |||
119 | |||
120 | [[config-plugin]] |
||
121 | |||
122 | [[json-plugin]] |
||
123 | |||
124 | [[sms-plugin]] |
||
125 | |||
126 | [[quagga-plugin]] |
||
127 | |||
128 | |||
129 | *Misc* |
||
130 | |||
131 | |||
132 | 2 | Pau Escrich | [[Tunnel]] |