On Friday 02 April 2010 17:43:48 Clemens John wrote:
on https://www.open-mesh.org/wiki/batman-adv stands, that the upcoming batman- adv 0.3 supports advanced gateway handling
We are testing Batman Advanced as described in my other thread and I want to share my Internetconnection on our network. How do I do this with Batman Advanced?
Just as usual - nat/masquerading and announcing that to your fellow participants.
Some bootstrapping protocol is the real thing which tells nodes were they can send their ip packets to. So imagine that you are sending a bootp request to the whole network - the fastest server would reply and give you enough information to adjust the routing table. But maybe this machine is not a good choice in metrics of batman-adv. The idea is now to forward that packet only to a specific host instead of the whole network - it is not real clean in terms of separation of layers, but it works without adding another specialized ip routing daemon. This is _only_ needed if you have a "complicated" setup with many gateways which must be chosen depending on the state of the mesh. Single gateways just work as you would expect it without that support.
Is there already a working Batman Advanced version that supports Internet connection sharing (Maybe Trunk? Which revision?)?
Trunk is where the development work is done for 0.3. I will not point you to the actual commit, because it would be a version with known bugs - which are fixed in the current trunk version.
I think most of the code is inside gateway-* files. You will notice that is looks similar to the batmand code - so you can read the batmand stuff how the actual selection of a gateway works.
Basically you will have a gateway_mode in /sys or /proc (depends on the version you use - Marek just switches everything to a new configuration layout in /sys). This can be used to say "hey, I am a server" or "I am a client and will choose the best destination in case of a request (udp broadcast to dst port 67)". The real dhcp server must be running on the server or such request will not answered. You can also choose a scheme which choose how such gateways are elected by the client and the server announce their bandwidth - but as you will see now, it is only needed in situation with multiple gateways and a more complex mesh situation.
In Olsr there was the dyn_gateway_plugin. How can I have something like it´s functionality in Batman Advanced?
OLSR works on a complete different level. batmand was the thing which worked similar to olsrd (same layer). It has also an interesting feature called blackhole detection and can work with multiple gateways - but it is not batman-adv. So comparison of that plugin makes no sense.
Just as reminder: batman-adv can choose a gateway but will _not_ setup the whole routing stuff on ip layer on client or server. You can use whatever works on top of ethernet (maybe some work better than others on top of a mesh).
Best regards, Sven