All of lore.kernel.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] Unable to connect to internet
@ 2009-03-11 20:57 marco tozzini
  2009-03-11 21:14 ` elektra
  2009-03-16 22:54 ` Sven Eckelmann
  0 siblings, 2 replies; 11+ messages in thread
From: marco tozzini @ 2009-03-11 20:57 UTC (permalink / raw)
  To: b.a.t.m.a.n

Hi All,
I have 2 fonera router running openwrt and batman
wireless IP are 192.168.2.200 and 192.168.2.203

Routers have separete wifi and eth interfaces

Here it is openwrt network config file:

root@OpenWrt:~# cat /etc/config/network
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 'type' 'bridge'
        option 'proto' 'static'
        option 'ifname' 'eth0'
        option 'ipaddr' '192.168.0.203'
        option 'netmask' '255.255.255.0'
        option 'gateway' '192.168.0.1'
        option 'dns' '192.168.0.1'

config 'interface' 'wifi'
        option 'ifname' 'ath0'
        option 'proto' 'static'
        option 'ipaddr' '192.168.2.203'
        option 'netmask' '255.255.255.0'

other router has br-lan 192.168.1.200 and 192.168.0.200

router 192.168.2.203 is connected to my ADSL modem (IP 192.168.0.1) 
through ethernet port (br-lan in openwrt)
I would like to connect to internet (and at least to ADSL modem) but 
something doesn't work...

I used this command on node 200:
root@OpenWrt:~# batmand ath0

I used this command on node 203:
root@OpenWrt:~# batmand -a 192.168.0.1/24 ath0
Interface activated: ath0
Using interface ath0 with address 192.168.2.203 and broadcast address 
192.168.2.255


Here it is result from ping command issued from node 200

root@OpenWrt:~# ping -c 3 192.168.2.203
PING 192.168.2.203 (192.168.2.203): 56 data bytes
64 bytes from 192.168.2.203: seq=0 ttl=64 time=3.539 ms
64 bytes from 192.168.2.203: seq=1 ttl=64 time=2.875 ms
64 bytes from 192.168.2.203: seq=2 ttl=64 time=6.233 ms

--- 192.168.2.203 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 2.875/4.215/6.233 ms
root@OpenWrt:~# ping -c 3 192.168.0.203
PING 192.168.0.203 (192.168.0.203): 56 data bytes
64 bytes from 192.168.0.203: seq=0 ttl=64 time=4.981 ms
64 bytes from 192.168.0.203: seq=1 ttl=64 time=2.991 ms
64 bytes from 192.168.0.203: seq=2 ttl=64 time=3.119 ms

--- 192.168.0.203 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 2.991/3.697/4.981 ms
root@OpenWrt:~# ping -c 3 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes

--- 192.168.0.1 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss
root@OpenWrt:~# ssh root@192.168.0.203
root@192.168.0.203's password:


BusyBox v1.11.2 (2008-10-07 13:44:59 UTC) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 KAMIKAZE (8.09, r13118) ----------------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
 ---------------------------------------------------
root@OpenWrt:~# ping -c 3 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
64 bytes from 192.168.0.1: seq=0 ttl=255 time=4.106 ms
64 bytes from 192.168.0.1: seq=1 ttl=255 time=2.193 ms
64 bytes from 192.168.0.1: seq=2 ttl=255 time=2.187 ms

--- 192.168.0.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 2.187/2.828/4.106 ms
root@OpenWrt:~#

As you can see from node 200 I can ping node 203 (wireless interface 
192.168.2.203 and wired interface 192.168.0.203), but I'm unable to go 
through adsl modem (192.168.0.1)
But I can connect to adsl modem from node 203

Any Hints?

Thanks

Ciao
Marco



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [B.A.T.M.A.N.] Unable to connect to internet
  2009-03-11 20:57 [B.A.T.M.A.N.] Unable to connect to internet marco tozzini
@ 2009-03-11 21:14 ` elektra
  2009-03-12 21:40   ` marco tozzini
  2009-03-14  8:52   ` marco tozzini
  2009-03-16 22:54 ` Sven Eckelmann
  1 sibling, 2 replies; 11+ messages in thread
From: elektra @ 2009-03-11 21:14 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

Hi .

> Any Hints?

sure: You are not announcing a default route.

On mesh router connected to ADSL:

batmand -g 1000 ath0

On other mesh router:

batmand -r 1 ath0

You have to NAT towards the internet on the gateway.

Cheers,
elektra 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [B.A.T.M.A.N.] Unable to connect to internet
  2009-03-11 21:14 ` elektra
@ 2009-03-12 21:40   ` marco tozzini
  2009-03-13  2:11     ` Marek Lindner
  2009-03-14  8:04     ` marco tozzini
  2009-03-14  8:52   ` marco tozzini
  1 sibling, 2 replies; 11+ messages in thread
From: marco tozzini @ 2009-03-12 21:40 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

elektra wrote:
> Hi .
>
>   
>> Any Hints?
>>     
>
> sure: You are not announcing a default route.
>
> On mesh router connected to ADSL:
>
> batmand -g 1000 ath0
>
> On other mesh router:
>
> batmand -r 1 ath0
>
> You have to NAT towards the internet on the gateway.
>
> Cheers,
> elektra 
>   

Thank you for your help
It still doesn't work
But something I can't understand happened

root@OpenWrt:~# batmand -a 192.168.0.1/24 -g 1000 -d 3 ath0
WARNING: You are using the unstable batman branch. If you are interested 
in *using* batman get the latest stable release !
Interface activated: ath0
Using interface ath0 with address 192.168.2.200 and broadcast address 
192.168.2.255
B.A.T.M.A.N. 0.3-beta (compatibility version 5)
Warning - batgat kernel modul interface (/dev/batgat) not usable: No 
such file or directory
This may decrease the performance of batman!
debug level: 3
gateway class: 33 -> propagating: 1024KBit/256KBit
Adding throw route to 192.168.0.0/24 via 0.0.0.0 (table 65 - unknown)
Adding throw route to 192.168.0.0/24 via 0.0.0.0 (table 66 - unknown)
Adding throw route to 192.168.0.0/24 via 0.0.0.0 (table 67 - unknown)
Adding throw route to 192.168.0.0/24 via 0.0.0.0 (table 68 - unknown)
Adding route to 169.254.0.0/16 via 0.0.0.0 (table 254 - gate0)
Adding route to 192.168.2.203 via 0.0.0.0 (table 66 - ath0)

root@OpenWrt:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use 
Iface
192.168.2.0     *               255.255.255.0   U     0      0        0 ath0
192.168.0.0     *               255.255.255.0   U     0      0        0 
br-lan
169.254.0.0     *               255.255.0.0     U     0      0        0 
gate0
default         www.routerlogin 0.0.0.0         UG    0      0        0 
br-lan
root@OpenWrt:~#

It seems batman set a gate0 interface with 169.254.x.x IP address
How can I use this one with my 192.168.0.1 ADSL router?

Thanks

Ciao
Marco




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [B.A.T.M.A.N.] Unable to connect to internet
  2009-03-12 21:40   ` marco tozzini
@ 2009-03-13  2:11     ` Marek Lindner
  2009-03-14  8:13       ` marco tozzini
  2009-03-14  8:04     ` marco tozzini
  1 sibling, 1 reply; 11+ messages in thread
From: Marek Lindner @ 2009-03-13  2:11 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking


Hi,

> root@OpenWrt:~# batmand -a 192.168.0.1/24 -g 1000 -d 3 ath0
> WARNING: You are using the unstable batman branch. If you are interested
> in *using* batman get the latest stable release !
> Interface activated: ath0
> Using interface ath0 with address 192.168.2.200 and broadcast address
> 192.168.2.255
> B.A.T.M.A.N. 0.3-beta (compatibility version 5)

are you using the latest version ? Elektra reported a bug if you use the 
latest version together with the "-a" option. As a result the node that runs 
with that option enabled does not see any neighbours. Can you confirm that ?


> It seems batman set a gate0 interface with 169.254.x.x IP address
> How can I use this one with my 192.168.0.1 ADSL router?

You can safely ignore the 169.254.x.x addresses. Batman uses that for its 
internal tunneling mechanism which should not concern you.
Does your setup work now or not ?

Regards,
Marek


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [B.A.T.M.A.N.] Unable to connect to internet
  2009-03-12 21:40   ` marco tozzini
  2009-03-13  2:11     ` Marek Lindner
@ 2009-03-14  8:04     ` marco tozzini
  1 sibling, 0 replies; 11+ messages in thread
From: marco tozzini @ 2009-03-14  8:04 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

marco tozzini wrote:
> elektra wrote:
>> Hi .
>>
>>  
>>> Any Hints?
>>>     
>>
>> sure: You are not announcing a default route.
>>
>> On mesh router connected to ADSL:
>>
>> batmand -g 1000 ath0
>>
>> On other mesh router:
>>
>> batmand -r 1 ath0
>>
>> You have to NAT towards the internet on the gateway.
>>
>> Cheers,
>> elektra   
>
> Thank you for your help
> It still doesn't work
> But something I can't understand happened
>
> root@OpenWrt:~# batmand -a 192.168.0.1/24 -g 1000 -d 3 ath0
> WARNING: You are using the unstable batman branch. If you are 
> interested in *using* batman get the latest stable release !
> Interface activated: ath0
> Using interface ath0 with address 192.168.2.200 and broadcast address 
> 192.168.2.255
> B.A.T.M.A.N. 0.3-beta (compatibility version 5)
> Warning - batgat kernel modul interface (/dev/batgat) not usable: No 
> such file or directory
> This may decrease the performance of batman!
> debug level: 3
> gateway class: 33 -> propagating: 1024KBit/256KBit
> Adding throw route to 192.168.0.0/24 via 0.0.0.0 (table 65 - unknown)
> Adding throw route to 192.168.0.0/24 via 0.0.0.0 (table 66 - unknown)
> Adding throw route to 192.168.0.0/24 via 0.0.0.0 (table 67 - unknown)
> Adding throw route to 192.168.0.0/24 via 0.0.0.0 (table 68 - unknown)
> Adding route to 169.254.0.0/16 via 0.0.0.0 (table 254 - gate0)
> Adding route to 192.168.2.203 via 0.0.0.0 (table 66 - ath0)
>
> root@OpenWrt:~# route
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    
> Use Iface
> 192.168.2.0     *               255.255.255.0   U     0      0        
> 0 ath0
> 192.168.0.0     *               255.255.255.0   U     0      0        
> 0 br-lan
> 169.254.0.0     *               255.255.0.0     U     0      0        
> 0 gate0
> default         www.routerlogin 0.0.0.0         UG    0      0        
> 0 br-lan
> root@OpenWrt:~#
>
> It seems batman set a gate0 interface with 169.254.x.x IP address
> How can I use this one with my 192.168.0.1 ADSL router?
>
> Thanks
>
> Ciao
> Marco
>

Sorry my fault here
I swapped the 2 routers since my first post
so the dump above is related to:
192.168.0.200 connected to ADSL modem
192.168.0.203 is not just a batman node

Ciao
Marco


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [B.A.T.M.A.N.] Unable to connect to internet
  2009-03-13  2:11     ` Marek Lindner
@ 2009-03-14  8:13       ` marco tozzini
  2009-03-14 11:01         ` Marek Lindner
  0 siblings, 1 reply; 11+ messages in thread
From: marco tozzini @ 2009-03-14  8:13 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

Hi Marek

Marek Lindner wrote:
> Hi,
>
>   
>> root@OpenWrt:~# batmand -a 192.168.0.1/24 -g 1000 -d 3 ath0
>> WARNING: You are using the unstable batman branch. If you are interested
>> in *using* batman get the latest stable release !
>> Interface activated: ath0
>> Using interface ath0 with address 192.168.2.200 and broadcast address
>> 192.168.2.255
>> B.A.T.M.A.N. 0.3-beta (compatibility version 5)
>>     
>
> are you using the latest version ? Elektra reported a bug if you use the 
> latest version together with the "-a" option. As a result the node that runs 
> with that option enabled does not see any neighbours. Can you confirm that ?
>
>
>   
No idea it's the version available from Openwrt kamikaze 8.09
batmand -v reports on my fonera v2 (192.168.0.200):
root@OpenWrt:~# batmand -c -v
WARNING: You are using the unstable batman branch. If you are interested 
in *using* batman get the latest stable release !
B.A.T.M.A.N. 0.3-beta (compatibility version 5)

batmand -v reports on my fonera v1 (192.168.0.203):
root@OpenWrt:~# batmand -c -v
B.A.T.M.A.N. 0.3.1 rv1206 (compatibility version 5)

Do you think this mix is not good?

If you mean batman node as neighbor the answer is:
I can see batman neighbors
I can't see node on my wired network (adsl route 192.168.0.1, other 
openwrt station 192.168.0.80)

>> It seems batman set a gate0 interface with 169.254.x.x IP address
>> How can I use this one with my 192.168.0.1 ADSL router?
>>     
>
> You can safely ignore the 169.254.x.x addresses. Batman uses that for its 
> internal tunneling mechanism which should not concern you.
> Does your setup work now or not ?
>
>   
Thank you so much for this info
AFAIK there is no such information anywhere

My system is still not working
Any hints for debug or throubleshoot?

Ciao
Marco


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [B.A.T.M.A.N.] Unable to connect to internet
  2009-03-11 21:14 ` elektra
  2009-03-12 21:40   ` marco tozzini
@ 2009-03-14  8:52   ` marco tozzini
  2009-03-14  9:14     ` elektra
  1 sibling, 1 reply; 11+ messages in thread
From: marco tozzini @ 2009-03-14  8:52 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

elektra wrote:
> Hi .
>
>   
>> Any Hints?
>>     
>
> sure: You are not announcing a default route.
>
> On mesh router connected to ADSL:
>
> batmand -g 1000 ath0
>
> On other mesh router:
>
> batmand -r 1 ath0
>
> You have to NAT towards the internet on the gateway.
>
> Cheers,
> elektra 
>   

After this hint I have
node 203 = batman node not connect to internet
node 200 = batman node gateway connect to wired lan and internet

 >From the batman node client 203 (not connected to internet)
root@OpenWrt:~# ping -c 2 192.168.2.200 (= ath0)
PING 192.168.2.200 (192.168.2.200): 56 data bytes
64 bytes from 192.168.2.200: seq=0 ttl=64 time=3.330 ms
64 bytes from 192.168.2.200: seq=1 ttl=64 time=2.902 ms
--- 192.168.2.200 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 2.902/3.116/3.330 ms

root@OpenWrt:~# ping -c 2 192.168.0.200 (= br-lan)
PING 192.168.0.200 (192.168.0.200): 56 data bytes
64 bytes from 192.168.0.200: seq=0 ttl=64 time=4.780 ms
64 bytes from 192.168.0.200: seq=1 ttl=64 time=2.944 ms
--- 192.168.0.200 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 2.944/3.862/4.780 ms

root@OpenWrt:~# ping -c 2 192.168.0.1 (= router ADSL)
PING 192.168.0.1 (192.168.0.1): 56 data bytes
--- 192.168.0.1 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss

root@OpenWrt:~# ping -c 2 192.168.0.80 (= other openwrt station 
connected through lan cable)
PING 192.168.0.80 (192.168.0.80): 56 data bytes
--- 192.168.0.80 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss


further; from GATEWAY batman node 200 (connected to wired lan and internet)
I can ping everything

So this means:

 From the CLIENT batman node 203 (not connected to wired lan and internet)
I can ping wireless interface of the batman node connected to wired lan
I can ping br-lan wired interface of the batman node connected to wired 
lan (so I think routing exist)
I CAN'T ping other nodes seen by br-lan wired interface of the batman 
node connected to wired lan

I suspect the problem could be elsewhere batman, isn't it?

thanks
Marco



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [B.A.T.M.A.N.] Unable to connect to internet
  2009-03-14  8:52   ` marco tozzini
@ 2009-03-14  9:14     ` elektra
  0 siblings, 0 replies; 11+ messages in thread
From: elektra @ 2009-03-14  9:14 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

Hi!

> > On mesh router connected to ADSL:
> >
> > batmand -g 1000 ath0
> >
> > On other mesh router:
> >
> > batmand -r 1 ath0
> >
> > You have to NAT towards the internet on the gateway.

There is a bug in batmand in current 0.3.2 code, which occurs when you use HNA 
(-a). We are currently working on it. You don't need to use -a to connect to 
the internet in your case, however. But you have to set up simple NAT towards 
the interface of the batman-gateway connected to the ADSL modem.

If that interface is eth0 the command would be:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Cheers,
elektra

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [B.A.T.M.A.N.] Unable to connect to internet
  2009-03-14  8:13       ` marco tozzini
@ 2009-03-14 11:01         ` Marek Lindner
  0 siblings, 0 replies; 11+ messages in thread
From: Marek Lindner @ 2009-03-14 11:01 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Saturday 14 March 2009 16:13:13 marco tozzini wrote:
> No idea it's the version available from Openwrt kamikaze 8.09
> batmand -v reports on my fonera v2 (192.168.0.200):
> B.A.T.M.A.N. 0.3-beta (compatibility version 5)
>
> batmand -v reports on my fonera v1 (192.168.0.203):
> B.A.T.M.A.N. 0.3.1 rv1206 (compatibility version 5)

The 0.3.1 is good but please don't use the 0.3-beta in a production 
environment! The 0.3 contained several bugs thats why we had the 0.3.1 
release. Consider upgrading to the latest stable release (0.3.1 at the 
moment).

Regards,
Marek


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [B.A.T.M.A.N.] Unable to connect to internet
  2009-03-11 20:57 [B.A.T.M.A.N.] Unable to connect to internet marco tozzini
  2009-03-11 21:14 ` elektra
@ 2009-03-16 22:54 ` Sven Eckelmann
  1 sibling, 0 replies; 11+ messages in thread
From: Sven Eckelmann @ 2009-03-16 22:54 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking,
	marco tozzini

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

On Wednesday 11 March 2009 21:57:34 marco tozzini wrote:
[...]
> As you can see from node 200 I can ping node 203 (wireless interface
> 192.168.2.203 and wired interface 192.168.0.203), but I'm unable to go
> through adsl modem (192.168.0.1)
> But I can connect to adsl modem from node 203
Solution was found today on irc. Marco hadn't setup a NAT on the gateway node 
as described in paragraph 4.2 " Why I can’t connect to the Internet after 
setting the default gateway?" in
 http://downloads.open-mesh.net/batman/misc/batmand_howto.pdf

A different solution was suggested by Simon to set the route to 192.168.2.x 
nodes on 192.168.0.x nodes over the gateway node. This way the 192.168.0.x can 
send answer packets to 192.168.2.x when it receives packets from 192.168.2.x 
nodes without a NAT between the networks. 192.168.2.x could send to 
192.168.0.x because the batman gateway node announced it to batman gateway 
clients, but packets in the other direction never found their way because the 
batman gateway doesn't announce a backward route to the 192.168.2.x nodes 
outside the mesh. This wasn't due to a fault of batmand, but a 
misunderstanding what the -a option does and what batmand cannot do (set 
routing informations on nodes outside the mesh).

Regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [B.A.T.M.A.N.] Unable to connect to internet
@ 2009-03-17  9:39 Marco Tozzini
  0 siblings, 0 replies; 11+ messages in thread
From: Marco Tozzini @ 2009-03-17  9:39 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking


----- Original Message Follows -----
From: Sven Eckelmann


> Solution was found today on irc.
...

> Regards,
>     Sven

indeed it is !
thanks you so much for your support (expecially d0tslash on
irc #batman channel)

Ciao
Marco


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-03-17  9:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-11 20:57 [B.A.T.M.A.N.] Unable to connect to internet marco tozzini
2009-03-11 21:14 ` elektra
2009-03-12 21:40   ` marco tozzini
2009-03-13  2:11     ` Marek Lindner
2009-03-14  8:13       ` marco tozzini
2009-03-14 11:01         ` Marek Lindner
2009-03-14  8:04     ` marco tozzini
2009-03-14  8:52   ` marco tozzini
2009-03-14  9:14     ` elektra
2009-03-16 22:54 ` Sven Eckelmann
2009-03-17  9:39 Marco Tozzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.