Anygw

Version 2 (Gui Iribarren, 10/18/2013 04:08 pm)

1 1 Gui Iribarren
h1. Anygw
2 1 Gui Iribarren
3 1 Gui Iribarren
One solution is to share the same IPv4/IPv6 and also MAC address, to avoid ARP timeouts
4 1 Gui Iribarren
5 1 Gui Iribarren
> ip link add link br-lan anygw address aa:aa:aa:40:28:b5 type macvlan
6 1 Gui Iribarren
> ip address add dev anygw fddf:ca40:28b5::1/64
7 1 Gui Iribarren
> ip address add dev anygw 192.168.11.1/24
8 1 Gui Iribarren
> ip link set anygw up
9 1 Gui Iribarren
> ebtables -A FORWARD -d aa:aa:aa:40:28:b5 -j DROP
10 1 Gui Iribarren
> ebtables -t nat -A POSTROUTING -s aa:aa:aa:40:28:b5 -o bat0 -j DROP
11 1 Gui Iribarren
12 2 Gui Iribarren
this solution works only when every node is doing layer3 dynamic routing (i.e. BMX6 everywhere, anygw interface everywhere)
13 1 Gui Iribarren
14 1 Gui Iribarren
Another possibility is not to share the same MAC address, instead relying on ARP timeouts, and the fact that batman will forward packets. The downside is suboptimal routing when roaming.
15 1 Gui Iribarren
16 1 Gui Iribarren
Third possibility is having batman correctly support anycast MACs; say "batctl anycast_prefix aa:aa:aa:00:00:00/24" that will make batman allow those MACs to be claimed by many nodes (preventing roaming of those MACs).
17 2 Gui Iribarren
18 2 Gui Iribarren
These last two options allow not running layer3 daemons on every node, only on the borders