On Tue, Oct 16, 2012 at 4:18 PM, Sophana K sophana78@gmail.com wrote:
On Mon, Oct 15, 2012 at 5:33 PM, Gui Iribarren gui@altermundi.net wrote:
Hey Sophana, Don't bridge the wan, as you won't be able to route then.
I would like to explicitely bridge the wan, as it is the private network. Just like a transparent wifi access point would do. Routing is not always what you want if you connect to your private LAN.
i think i don't fully understand your setup. could you care to describe it a little bit further?
we solved that "missing piece" with a few scripts
https://bitbucket.org/guidoi/batmesh/src/tip/packages/batman-adv-auto-gw-mod... https://bitbucket.org/guidoi/batmesh/src/tip/packages/watchping
Thanks a lot for sharing your code. I took some time to understand how it works. If I understand correctly, you are using the batman-adv gateway feature. watchping is a script that simply uses ping on a specific interface to determine wether you are connected to the internet. When connected, you launch a dhcp server. When not, you launch a dhcp client.
Correct. watchping takes care of pinging and running hooks based on result. batman-adv-auto-gw-mode is one of such hooks, that launchs a dhcp server + gw_mode=server when called in "wan success" (and undoes those actions when called in "wan failed")
Using dhcp means that you are routed.
As I would like to be bridged, this looks like it is not really a solution for me.
batman-adv gw_mode makes most sense in a routed situation, AFAIU
The only solution I see is to start with the wan not bridged, test internet connection for a certain amount of time, then definitively decide if we are gateway or not.
Why not leave it bridged from the start? as said previously, i probably don't understand your setup.
I still have to test your solution. Do I have to install all the batmesh packages?
Nope, they are meant to be independent. They just sit on the same repo for now.
It seems that the whole configuration is made in batmesh-autoconf?
batmesh-autoconf takes care of setting ipv4 on lan interface, creating adhoc vifs in wlan0/1/2 and adding them to bat0. If you do that manually or otherwise, no need of using batmesh-autoconf :)
Too bad you don't have all default ar71xx router images ready to flash.
Will do.
Cheers!