Debian Codegraph @

README

raw
1 Babel
2 =====
3
4 Babel is a loop-avoiding distance-vector routing protocol roughly
5 based on HSDV and AODV, but with provisions for link cost estimation
6 and redistribution of routes from other routing protocols.
7
8
9 Installation
10 ============
11
12 $ make
13 $ su -c 'make install'
14
15 If compiling for OpenWRT, you will probably want to say something like
16
17 $ make CC=mipsel-linux-gcc PLATFORM_DEFINES='-march=mips32'
18
19 On Mac OS X, you'll need to do
20
21 $ make LDLIBS=''
22
23
24 Setting up a network for use with Babel
25 =======================================
26
27 1. Set up every node's interface
28 --------------------------------
29
30 On every node, set up the wireless interface:
31
32 # iwconfig eth1 mode ad-hoc channel 11 essid "my-mesh-network"
33 # ip link set up dev eth1
34
35 2. Set up every node's IP addresses
36 -----------------------------------
37
38 You will need to make sure that all of your nodes have a unique IPv6
39 address, and/or a unique IPv4 address.
40
41 On every node, run something like:
42
43 # ip addr add 192.168.13.33/32 dev eth1
44 # ip -6 addr add $(generate-ipv6-address -r)/128 dev eth1
45
46 You will find the generate-ipv6-address utility, which can generate random
47 IPv6 addresses according to RFC 4193, on
48
49 https://www.irif.fr/~jch/software/files/
50
51
52 A note about tunnels and VPNs
53 -----------------------------
54
55 Some VPN implementations (notably OpenVPN and Linux GRE) do not
56 automatically add an IPv6 link-local address to the tunnel interface.
57 If you attempt to run Babel over such an interface, it will complain
58 that it ``couldn't allocate requested address''.
59
60 The solution is to manually add the link-local address to the
61 interface. This can be done by running e.g.
62
63 # ip -6 addr add $(generate-ipv6-address fe80::) dev gre0
64
65
66 3. Start the routing daemon
67 ---------------------------
68
69 Run Babel on every node, specifying the set of interfaces that it
70 should consider:
71
72 # babeld eth1
73
74 If your node has multiple interfaces which you want to participate in
75 the Babel network, just list them all:
76
77 # babeld eth0 eth1 sit1
78
79
80 4. Setting up an Internet gateway
81 ---------------------------------
82
83 If you have one or more Internet gateways on your mesh network, you
84 will want to set them up so that they redistribute the default route.
85 Babel will only redistribute routes with an explicit protocol
86 attached, so you must say something like:
87
88 # ip route add 0.0.0.0/0 via 1.2.3.4 dev eth0 proto static
89
90 In order to redistribute all routes, you will say:
91
92 # babeld -C 'redistribute metric 128' eth1
93
94 You may also be more selective in the routes you redistribute, for
95 instance by specifying the interface over which the route goes out:
96
97 # babeld -C 'redistribute if eth0 metric 128' eth1
98
99 or by constraining the prefix length:
100
101 # babeld -C 'redistribute ip ::/0 le 64 metric 128' \
102 -C 'redistribute ip 0.0.0.0/0 le 28 metric 128' \
103 eth1
104
105 You may also want to constrain which local routes (routes to local
106 interface addresses) you advertise:
107
108 # babeld -C 'redistribute local if eth1' -C 'redistribute local deny' \
109 -C 'redistribute metric 128' \
110 eth1
111
112 -- Juliusz Chroboczek