Re: [B.A.T.M.A.N.] How to detect gateway mode in openwrt?

2012-10-19 Thread Sophana K
With this solution (if it works), both the WAN(private) and
LAN(public) network would always remain bridged to the mesh and LAN
and WAN ethernet ports.

The script has to determine if it is the gateway, mainly because there
must be only one coova-chilli hotspot instance which manages the LAN
network. This coova-chilli IS the gateway for the LAN (public)
network.
Note that it seems that coova-chilli has a cluster mode which is not
documented, and seems to allows multiple hotspot instances to work in
failover mode. (have to test it)

About translocal and transglobal tables, if I understood correctly,
translocal shows only mesh nodes, while transglobal shows all the mac
addresses in the arp table?


On Fri, Oct 19, 2012 at 6:45 AM, Gui Iribarren g...@altermundi.net wrote:

 It's more.. robust.. if you parse translocal table instead. BUT...

 Why not just connect the gateway to the LAN switch (or permanently
 bridge the WAN, which is equivalent)?
 Why do you want to break the bridge? Under what circumstances does
 that make sense (or why is it a problem to leave the WAN bridged when
 the gateway is not directly connected)?


Re: [B.A.T.M.A.N.] How to detect gateway mode in openwrt?

2012-10-18 Thread Gui Iribarren
On Wed, Oct 17, 2012 at 6:14 PM, Sophana K sophan...@gmail.com wrote:
 I may have found a possible solution by parsing the output of batctl
 transglobal, and look for the gateway mac address. If the gateway is
 in the transglobal table, it is accessed through the mesh, and it is
 probably not connected directly to the router.
It's more.. robust.. if you parse translocal table instead. BUT...

Why not just connect the gateway to the LAN switch (or permanently
bridge the WAN, which is equivalent)?
Why do you want to break the bridge? Under what circumstances does
that make sense (or why is it a problem to leave the WAN bridged when
the gateway is not directly connected)?


Re: [B.A.T.M.A.N.] How to detect gateway mode in openwrt?

2012-10-16 Thread Sophana K
On Mon, Oct 15, 2012 at 5:33 PM, Gui Iribarren g...@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.

 we solved that missing piece with a few scripts

 https://bitbucket.org/guidoi/batmesh/src/tip/packages/batman-adv-auto-gw-mode
 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.

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.
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.

When you are bridged, is there is solution to ping only the WAN port?

I still have to test your solution. Do I have to install all the
batmesh packages? It seems that the whole configuration is made in
batmesh-autoconf?
Too bad you don't have all default ar71xx router images ready to flash.


Re: [B.A.T.M.A.N.] How to detect gateway mode in openwrt?

2012-10-15 Thread Gui Iribarren
On Mon, Oct 15, 2012 at 12:33 PM, Gui Iribarren g...@altermundi.net wrote:
 Given that it's all posix ash (no binaries), you can probably grab our
 precompiled packages as well.

Ooops.. broken link. Sorry, here's the current one:
http://openwrt.altermundi.net/snapshots/current/ar71xx/packages/batman-adv-auto-gw-mode_3-1_ar71xx.ipk
http://openwrt.altermundi.net/snapshots/current/ar71xx/packages/watchping_1.1-1_ar71xx.ipk