It was a fool thing. I needed to add /sbin/iptables -t nat -A POSTROUTING -o <wan interface> -j MASQUERADE to the gateway node. A L3 matter!
The help came from forum.openwrt , but thanks for your patience ;-)
2012/8/3 Esteban Municio email@example.com:
This is the diagram of my network:
When I make ping from the laptop to 184.108.40.206, the result is nothing. root@orion:/home/emunicio# ping 220.127.116.11 PING 18.104.22.168 (22.214.171.124) 56(84) bytes of data. ^C
I mean there is not a 'host/net unreachable' message, that makes me think that maybe the ping can get there, but it does not know how to came back to my laptop.It is the reason for I think is only a Nat problem. Can be?
I seem that the problem is in L3, no in batman-adv configuration, because the connectivity between nodes and laptos works well. Any idea or advice?
2012/8/3 Sven Eckelmann firstname.lastname@example.org:
On Thursday 02 August 2012 19:35:34 Esteban Municio wrote:
I wrote recently about problems with our batman-adv mesh implementation in a development proyect in Peru:
Now we are having problems again. Our mesh-network are formed with Ubiquiti nanostation M5 nodes running OpenWRT(10.03.x, r32751)+ Batman-adv 2.6.32.
batman-adv was not included in 2.6.32. We had our first version in 2.6.33. So, this information is bogus. Please update to a recent version (for example 2012.2.0 + the updates from the maint branch; or just batman-adv-devel).
In one of the nodes, the wan gate is connected with Public IP to internet and I can access to internet from there.
But from a laptop(without batman-adv), I can make ping to all the nodes of the mesh, but i can't make ping to 126.96.36.199 neither the Ip public gateway. However, I can make ping to my Ip Public, in the interface wan of my gateway node.
What am I doing wrong? I have tried to write static routes, but I think that the problem is about the mesh-bridge. Is it beacuse of i need do NAT?
It is hard to understand what you are doing and what you want. All you are doing here is L3 stuff... so out of scope for batman-adv. batman-adv provides only the l2 stuff (+ a dhcp routing hack when you enable the gateway stuff).
So you need to do the same stuff you are doing when you want to configure an "internet gateway" for your private network. That usually includes masquerading, dhcp, dns, ...
All the nodes of the mesh can see themselves, and I set the node with the gateway to internet like the gateway of the mesh, but it does not work.
Any help or comment?
Sry, my parser failed. Maybe someone else can help.
That is my /etc/rc.local and /etc/config/network in the gateway node:
wifi up ifconfig wlan0 mtu 1528 batctl if add wlan0 ifconfig wlan0 up ifconfig bat0 up brctl addbr mesh-bridge brctl addif mesh-bridge eth0 brctl addif mesh-bridge bat0 ifconfig eth0 up ifconfig bat0 up ifconfig mesh-bridge inet 188.8.131.52 netmask 255.255.255.0 ifconfig mesh-bridge up exit 0
config 'interface' 'loopback' option 'ifname' 'lo' option 'proto' 'static' option 'ipaddr' '127.0.0.1' option 'netmask' '255.0.0.0'
config 'interface' 'lan' option 'ifname' 'eth0' option 'proto' 'static' option 'ipaddr' '192.168.1.2' option 'netmask' '255.255.255.0'
config 'interface' 'wan' option 'ifname' 'eth1' option 'proto' 'static' option 'ipaddr' my Ip public option 'netmask' '255.255.255.192' option 'gateway' my ip public gateway option 'dns' '184.108.40.206'
And some offtopic questions...
What should i do for permit to others laptops without batman-adv can connect by wireless to the mesh, make another wlan interface with another ssid in ap mode and add it to the mesh-bridge?
Didn't you say that you are already doing something like that? At least you've mentioned that that you are can connect with you non-mesh laptop. But yes, you should have a second interface configured as AP attached to your mesh- bridge to allow wireless clients connected to this interface to work like the ethernet clients. It doesn't make much sense to have a non-batman-adv-aware client connected on a interface that is attached as slave (hard) interface to batman-adv.
At least the configuration looks a little bit like you are trying to do something like this.
Kind regards, Sven