Am Mittwoch 07 Juli 2010, 14:44:17 schrieb Antonio Quartulli:
Yes the network is working well but in this setup the central dhcp server is the only gateway because I only get the defaultroute of this server.
What if I have more gateways? I know that I can set the defaultroute to this server by hand but a "normal" user can´t do this. I need a method to choose the gateway individually and automatically so that the user gets the best gateway available.
Are there any ideas to do this? Or am I completely on the wrong way?
Marek asked me to describe our setup a bit more particularly so I´ll try to:
We have several clouds that can not see each other via WLAN. These clouds are connected to each other with Tinc VPN via the Internet. Batman runs only on WLAN, not on the VPN. The clients usually have no Batman advanced but connecting via a wlan interface which is bridged with bat0. The Tinc VPN interface is bridged with bat0 too.
All Nodes which are not a gateway have a link local IPv6 address only. We have a node with a DHCP server which is also gateway. This node has an IPv4 address and distributes IPv4 addresses with DHCP. Clients now get an IPv4 address from this node and set their default route to this node to get Internet.
The exact setup (only configurationfiles) is listed here: http://wiki.freifunk-ol.de/index.php?title=OpenWrt_Freifunk_B.A.T.M.A.N- advanced_konfiguration_2
With Tinc we are now well decentralised but we currently have the centralised gateway solution left so we would also like to decentralize the Gateway thing. That means multiple gateways with DHCP servers in different clouds (but not in every cloud). Each client should in theory have access to any gateway, but in practice they always get automatically access to the internet via the best possible gateway.
The question why the traffic is in some cases first routet through the VPN and then headed to the Internet is pretty easy to answer: We have 3 clouds. In two of them are people who are confident (the whole is indeed always a matter of law) with offering a gateway. The third cloud now in theory is connected to the Internet. But the person who offers the connection to the VPN does not want to head the traffic of the network through his connection direcly to the internet (because of reasons of law) so clients in this cloud have to use a gateway on the other side of the VPN.
If I'm not wrong, at this point you could put a dhcp server on each gateway and use the gw-mode feature of batman, so that each gw will anounce itself as gw and a dhcp request, becoming from a client, will be redirected to the best gw in the mesh.
Please someone corrects me if I am wrong.
This sounds interesting. Is this practicalbe? Has somebody tried this already or does someone know a better solution?
Btw.: Big thank you for so much patience ;) I´m also online on irc so maybe we can discuss these questions there?
Greetings Clemens