I've had a couple of chats over IRC those last days that show that people are confused about the new redistribution statements in Babel 0.10. So here are a few real-world examples.
0. Preliminaries Any routes that you redistribute into Babel must have an explicit protocol attached. If you use another routing daemon, it should do that right. If you install your routes manually, you need to specify ``proto static'' on the ``ip'' command line. So if you used to say # route add default gw 126.96.36.199 you now need to say # ip route add default via 188.8.131.52 proto static You can check whether your current routes can be redistributed into Babel by typing ``ip route show''. If a route has no ``proto'' field, Babel will ignore it. (If it says ``proto 42'', it's a Babel route.) Under no circumstances should you use -X. -X is dangerous, and it will cause persistent routing loops if you are not careful. Instead of -X, you should install a static route and redistribute it cleanly. The static route can of course be a blackhole route; so if you used to say -X 192.168.5.0/24 128 you should say instead # ip route add unreachable 192.168.5.0/24 proto static and then, in babel.conf, redistribute 192.168.5.0/24 le 24 metric 128 1. Ordinary mesh node Pirx only participates in Babel routing, and does not serve as a gateway. It only redistributes its local addresses, and redistributes all of them, so no babel.conf is necessary. 2. Mesh node with a wired link, no redistribution Beta is a mesh node that happens to be attached to an Ethernet. It has a single IPv6 address, but two IPv4 addresses: 192.168.4.26 on the mesh network, and 192.168.1.26 on the Ethernet; it redistributes its IPv6 address, its IPv4 mesh address, but not its Ethernet address. Its babel.conf says: redistribute local ip 192.168.4.0/24 redistribute local ip ::/0 redistribute local deny 3. IPv4 gateway Coloquinte is our Ipv4 gateway. It redistributes its IPv6 address, and a default route to the IPv4 Internet. It does not redistribute its own IPv4 address, which is subsumed by the default route: redistribute local ip ::/0 redistribute local deny redistribute 0.0.0.0/0 le 0 metric 128 The ``le 0'' means that only the default route will be redistributed, which avoids issues if coloquinte were to acquire additional IPv4 routes. 4. Traditional gateway One of my users has a number of pure IPv4 mesh nodes, each of which is on its own /28. The various /28 are disjoint, so there's no need to redistribute local addresses in addition to the /28 routes: redistribute local deny redistribute ip 10.0.0.0/8 le 28 metric 128 5. IPv6 gateway Alpha is similar to Beta, but it additionally participates in RIPng routing and redistributes the default route into the mesh network: redistribute local ip 192.168.4.0/24 redistribute local ip ::/0 redistribute local deny redistribute ip ::/0 le 0 metric 196 Again, ``le 0'' is used to only redistribute the default route; this avoids dumping the whole RIPng routing table of Paris 6 and 7 into the mesh network. 6. Hybrid gateway Huponomos is another IPv6 gateway, but it also plays a role with respect to IPv4 routing. In addition to everything that alpha does, it redistributes its local address in 184.108.40.206/24, as well as a local route to 220.127.116.11/25 (that's not a typo: /25, not /24 -- the /24 is subnetted). It has some other IPv4 addresses, which it does not redistribute. Additionally, it rejects any IPv6 routes that come from coloquinte (2001:41d0:1:6364::1): redistribute local ip ::/0 redistribute local ip 18.104.22.168/24 redistribute local ip 192.168.4.0/24 redistribute local deny redistribute ip ::/0 eq 0 proto 11 metric 128 redistribute ip 22.214.171.124/24 le 25 metric 128 in ip ::/0 le 32 id 2001:41d0:1:6364::1 deny Note that the default IPv6 route is redistributed with metric 128, while alpha redistributes it with the slightly larger metric 196; this is so that traffic from beta, which is a neighbour of both, will flow through huponomos rather than alpha. Hope this helps, Juliusz _______________________________________________ Babel-users mailing list Babelemail@example.com http://lists.alioth.debian.org/mailman/listinfo/babel-users