MP super Node connection problem

9 views
Skip to first unread message

Pascal Laurent

unread,
Feb 26, 2010, 11:30:20 AM2/26/10
to village-...@googlegroups.com
Lesson Learn
-------------
1) I can connect from MP to MP via ssh
2) I Cannot connect from MP to Super Node
3) I Cannot connect from Super Node to MP

I'm not o sure why step 2 and 3 are not working.

B.A.T.M.A.N Mesh on wrt54gl
=====================

Introduction
------------
For this setup i'm using kamikaze 8.09.2. I use kamikaze because I fee more confortable using it. My setup is as follow:

Super Node Mesh: 10.130.1.1
Super Node LAN: 10.1.1.1
Super Node WAN: 10.2.1.100

MP1 Mesh: 10.130.1.136
MP1 LAN: 10.1.2.1

MP2 Mesh: 10.130.1.137
MP2 LAN: 10.1.3.1
 
Asterisk Server: 10.2.1.6

Router LAN: 10.2.1.1
Router WAN (internet): DHCP

What you need to do
-------------------

Phase 1
-------
For phase I want to be able to connect to the MPs from the Super Node and from the Super Node to the MPs.

1) Flashing your linksys router with kamikaze 8.09.2
2) Getting wrt54gl configure and ready
3) Install and configure batmand
4) Configure routing tables
5) Testing Testing Testing
6) Lesson learn

Phase 2
-------
For phase 2 I want to be able to connect/register the MPs to the asterisk swerver.

7) Configure Asterisk
8) Connecting MPs to asterisk
9) Make and receive phone calls
10) Lesson learn

Phase 1
########

Flashing your linksys router with kamikaze 8.09.2
-------------------------------------------------
1) download the firmware http://downloads.openwrt.org/kamikaze/8.09.2/brcm-2.4/openwrt-brcm-2.4-squashfs.trx
2) Set your linux net device (assuming eth0): sudo ifconfig eth0 192.168.1.3/24
3) flash router: echo -e "binary\nrexmt 1\ntimeout 60\ntrace\nput
openwrt-brcm-2.4-squashfs.trx\n" | tftp 192.168.1.1
4) Be patient and let it finish

Getting wrt54gl configure and ready
-----------------------------------
1) telnet 192.168.1.1
2) disable firewall: /etc/init.d/firewall disable
3) Now do the following:

edit /etc/config/wireless
-------------------------
config wifi-device  wl0
        option type     broadcom
        option channel  1

        # REMOVE THIS LINE TO ENABLE WIFI:
        option disabled 0

config wifi-iface
        option device   wl0
        option network  wifi
        option mode     adhoc
        option ssid     SobiTelco
        option bssid    "01:CA:FF:EE:BA:BE"
        option encryption none

Save and exit

Edit /etc/config/network
------------------------
#### VLAN configuration
config switch eth0
        option vlan0    "1 2 3 4 5*"
        option vlan1    "0 5"


#### Loopback configuration
config interface loopback
        option ifname   "lo"
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0


#### LAN configuration
config interface lan
        option ifname   "eth0.0"
        option proto    static
        option ipaddr   10.1.1.1
        option netmask  255.255.255.0

#### WAN configuration
config interface        wan
        option ifname   "eth0.1"
        option proto    static
        option ipaddr   10.2.1.100
        option netmask  255.255.255.0
        option gateway  10.2.1.1
        option dns      10.2.1.1

#### Wi-Fi configuration            
config interface wifi               
        option ifname   "wl0"       
        option proto    static 
        option ipaddr   10.130.1.1
        option netmask  255.255.255.0

Save and Exit

Install and configure batmand
=============================
1) telnet 10.1.1.1
2) opkg update
3) opkg install kmod-tun libpthread
4) edit /etc/opkg.conf and do like so:
   #src/gz snapshots http://downloads.openwrt.org/kamikaze/8.09.2/brcm-2.4/packages
   save and exit
5) wget http://downloads.open-mesh.net/batman/development/binaries/misc/batmand_0.4-alpha-current_mipsel-kk-elf-32-lsb-dynamic.ipk
6) opkg install batmand_0.4-alpha-current_mipsel-kk-elf-32-lsb-dynamic.ipk
7) Create /etc/config/batmand (alpha does not create one)
   config batmand general
        option announce
        option originator_interval
        option preferred_gateway
        option routing_class 1
        option visualisation_srv
        option policy_routing_script
        option interface wl0
        option gateway_class 10mbit
    # option visualisation_srv 10.2.1.3
8)reboot

Configure routing tables
------------------------
Not sure not to do here:

-- Super Node
-- Router

Testing Testing Testing
-----------------------
This node is configured as a gateway. From this node I want to be able to connect to the MPs.

1) batmand -g 10mbit -a 10.1.1.0/24 --disable-client-nat wl0
2) iptables -F
3) iptables -t nat -A POSTROUTING -o eth0.1 -j MASQUERADE
2) batmand -d1 -c
3) You will se something like so:
Originator  (#/255)         Nexthop [outgoingIF]:   Potential nexthops ... [B.A.T.M.A.N. 0.4-alpha rv1534, MainIF/IP: wl0/10.130.1.1, UT: 0d 0h27m]
10.130.1.137    (  4)    10.130.1.137 [       wl0]:    10.130.1.137 (  4)
10.130.1.136    (  0)    10.130.1.136 [       wl0]:    10.130.1.136 (  0)

Pascal Laurent

unread,
Feb 26, 2010, 12:30:56 PM2/26/10
to village-...@googlegroups.com
Step 2 and 3 are now working, after reflashing the router and use the stable version of batmand that came with kamikaze 8.09.2 (0.3.1 rv1206). Using the alpha version isn't working:

Super Node
=========
Originator  (#/255)         Nexthop [outgoingIF]:   Potential nexthops ... [B.A.T.M.A.N. 0.3.1 rv1206, MainIF/IP: wl0/10.130.1.1, UT: 0d 0h 5m]
10.130.1.137    (244)    10.130.1.137 [       wl0]:    10.130.1.137 (244)    10.130.1.136 (239)
10.130.1.136    (249)    10.130.1.136 [       wl0]:    10.130.1.136 (249)    10.130.1.137 (237)

MP1
====
  Originator  (#/255)         Nexthop [outgoingIF]:   Potential nexthops ... [B.A.T.M.A.N. 0.4-alpha, MainIF/IP: ath0/10.130.1.136, UT: 0d 2h 7m]
10.130.1.137    (255)    10.130.1.137 [      ath0]:    10.130.1.137 (255)      10.130.1.1 (236)
10.130.1.1      (255)      10.130.1.1 [      ath0]:      10.130.1.1 (255)    10.130.1.137 (235)

MP2
====
Originator  (#/255)         Nexthop [outgoingIF]:   Potential nexthops ... [B.A.T.M.A.N. 0.4-alpha, MainIF/IP: ath0/10.130.1.137, UT: 0d 2h28m]
10.130.1.1      (241)    10.130.1.136 [      ath0]:      10.130.1.1 (239)    10.130.1.136 (241)
10.130.1.136    (255)    10.130.1.136 [      ath0]:    10.130.1.136 (255)      10.130.1.1 (218)

Elektra will there be performance issues using different version of batman?

Thanks,
--Pascal

elektra

unread,
Feb 26, 2010, 1:21:34 PM2/26/10
to village-...@googlegroups.com
Hello Pascal -

good to hear that your setup works now, however batmand-alpha can not be the
culprit. If batmand-alpha wouldn't be able to find its neighbors the MPs would
not be able to talk to each other. You should upgrade the version in your
router to batmand-alpha, the old version will crash as soon as you begin to
announce Internet gateways from a batmand-alpha. There can be more unexpected
problems.

However there seems to be one mistake in your configuration:


> > Getting wrt54gl configure and ready
> > -----------------------------------

...
> > edit /etc/config/wireless
...


> > # REMOVE THIS LINE TO ENABLE WIFI:
> > option disabled 0

Maybe you didn't remove the line "option disabled 0" during your previous
installation?

Cheers,
Elektra


Pascal Laurent

unread,
Feb 26, 2010, 2:20:15 PM2/26/10
to village-...@googlegroups.com
Elektra,

Thanks a bunch. If I understand correctly "option disabled 0" simply enable the wireless. Sure I will remove it from config file. Since I'm using kamikaze 8.09.2 on wrt54gl, which version of batman-alpha that I should use? Is this the correct one:  http://downloads.open-mesh.net/batman/development/binaries/misc/batmand_0.4-alpha-current_mipsel-kk-elf-32-lsb-dynamic.ipk

I see lots of different version here: http://downloads.open-mesh.net/batman/development/binaries/misc

I not too sure which one is the correct version for my hardware (wrt54gl)

Thanks,
--Pascal



--
You received this message because you are subscribed to the Google Groups "village-telco-dev" group.
To post to this group, send email to village-...@googlegroups.com.
To unsubscribe from this group, send email to village-telco-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/village-telco-dev?hl=en.


elektra

unread,
Feb 26, 2010, 6:28:56 PM2/26/10
to village-...@googlegroups.com
Hello Pascal -

> Thanks a bunch. If I understand correctly "option disabled 0" simply enable
> the wireless. Sure I will remove it from config file. Since I'm using
> kamikaze 8.09.2 on wrt54gl, which version of batman-alpha that I should
> use? Is this the correct one:
> http://downloads.open-mesh.net/batman/development/binaries/misc/batmand_0.4
> -alpha-current_mipsel-kk-elf-32-lsb-dynamic.ipk

to be honest I'm not sure. If you use a version that includes "-lsb-dynamic"
in the name, the program needs a certain version of dynamic shared libraries
from uclibc - thats the C library it is linked against. If the uclibc version
doesn't match it won't start.

I know that the versions in http://downloads.open-
mesh.org/batman/development/binaries/wrt-freifunk/ work with the Freifunk
firmware, but these are based on the old OpenWRT Whiterussian version, not
Kamikaze. The version of uclibc might have changed over the time.

Try http://downloads.open-mesh.org/batman/development/binaries/wrt-
freifunk/batmand_0.4-alpha-current_mipsel-wr-elf-32-lsb-dynamic.ipk first - if
this version starts, it is fine. If the uclibc version doesn't match it won't
start or crash immediately. In that case, uninstall it:

opkg remove batmand

If the dynamic version doesn't work for you, use:

http://downloads.open-mesh.org/batman/development/binaries/mipsel-
kamikaze/batmand_0.4-alpha-rv1534_mipsel-kk-elf-32-lsb-static.tgz

This version is statically compiled, so it is independend from shared
libraries. Note you have to unpack and install it by hand.

copy it to /tmp
(cd /tmp, wget http://downloads.open-
mesh.org/batman/development/binaries/mipsel-kamikaze/batmand_0.4-alpha-
rv1534_mipsel-kk-elf-32-lsb-static.tgz)

tar xvzf batmand_0.4-alpha-rv1534_mipsel-kk-elf-32-lsb-static.tgz

mv batmand*** /usr/bin/batmand

Cheers,
Elektra

Pascal Laurent

unread,
Feb 26, 2010, 7:01:34 PM2/26/10
to village-...@googlegroups.com
Thanks. The static version works for me. I'm not too sure if there errors will have any impact:


 batmand -g 10mbit -a 10.1.1.0/24 --disable-client-nat wl0

WARNING: You are using the unstable batman branch. If you are interested in *using* batman get the latest stable release !
Warning - the activated option '--disable-client-nat' has no effect without setting a routing class.
Interface activated: wl0
Using interface wl0 with address 10.130.1.1 and broadcast address 10.130.1.255


Cheers,
Elektra

elektra

unread,
Feb 26, 2010, 7:48:53 PM2/26/10
to village-...@googlegroups.com
Hello Pascal -

thats all fine. The first warning doesn't make sense since the current
development "alpha version" works really well, I don't know of current
problems.

You can skip the option --disable-client-nat on the mesh gateway node, the
option is superfluous. You may want to add it to the batmand configuration of
the MPs (gateway clients) in the mesh, if they provide Internet uplink
functionality for computers connected to their LAN port. This option allows to
act them as uplink without the need to do NAT there.

Cheers,
Elektra

Reply all
Reply to author
Forward
0 new messages