README 2.51 KB
Newer Older
1 2
Babel
*****
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
3

4
Babel is a loop-avoiding distance-vector routing protocol roughly
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
5
based on HSDV and AODV, but with provisions for link cost estimation
6
and redistribution of routes from other routing protocols.
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
7 8 9 10 11 12 13 14


Installation
************

  $ make
  $ su -c 'make install'

15 16 17 18
If compiling for OpenWRT, you will probably want to say something like

  $ make CC=mipsel-linux-gcc PLATFORM_DEFINES='-march=mips32'

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
19

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
20
Setting up a network for use with Babel
21
***************************************
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
22

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
23 24
1. Set up every node's interface
================================
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
25

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
26
On every node, set up the wireless interface:
27

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
28 29
  # iwconfig eth1 mode ad-hoc channel 11 essid "my-mesh-network"
  # ifconfig eth1 up
30

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
31 32
2. Set up every node's IP addresses
===================================
33

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
34 35
You will need to make sure that all of your nodes have a unique IPv6
address, and/or a unique IPv4 address.
36

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
37
On every node, run something like:
38

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
39 40
  # ip addr add 192.168.13.33/32 dev eth1
  # ip -6 addr add $(ahcp-generate-address -r)/128 dev eth1
41

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
42 43
You will find the ahcp-generate-address utility, which can generate
random IPv6 addresses according to RFC 4193, in the ahcpd package.
44 45


Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
46 47
3. Start the routing daemon
===========================
48

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
49
Run Babel on every node, specifying the set of interfaces it should consider:
50

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
51
  # babel eth1
52

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
53 54
If your node has multiple interfaces which you want to participate in
the Babel network, just list them all:
55

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
56
  # babel eth0 eth1 sit1
57 58


Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
59 60
4. Setting up an Internet gateway
=================================
61

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
62 63 64
If you have one or more Internet gateways on your mesh network, you
will want to set them up so that they redistribute the default route.
You will want to say something like
65

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
66
  # babel -C 'redistribute metric 128' eth1
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
67

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
68 69
You may also be more selective in the routes you redistribute, for
instance by specifying the interface over which the route goes out:
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
70

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
71
  # babel -C 'redistribute if eth0 metric 128' eth1
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
72

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
73
or by constraining the prefix length:
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
74

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
75 76
  # babel -C 'redistribute ip ::/0 le 64 metric 128' \
          -C 'redistribute ip 0.0.0.0/0 le 28 metric 128' \
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
77
          eth1
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
78

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
79 80
You may also want to constrain which local routes (routes to local
interface addresses) you advertise:
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
81

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
82 83 84
  # babel -C 'redistribute local if eth1' -C 'redistribute local deny' \
          -C 'redistribute metric 128' \
          eth1
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
85 86 87 88 89

If you find all of this too complicated and error-prone (as I do), you
may want to consider autoconfiguring your routing domain using AHCP:

  http://www.pps.jussieu.fr/~jch/software/ahcp/
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
90

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
91
                                        Juliusz Chroboczek