Nanostation M2 configuration as supernode

524 views
Skip to first unread message

Joe

unread,
Jan 21, 2011, 1:20:30 AM1/21/11
to village-telco-dev
Hi,

Im not able to configure the nanostation to act as a supernode for the
mesh network.
i have followed the instructions for /etc/config/network, ../batamnd
and ../wireless from

http://dili.villagetelco.org/index.php?title=Main_Page#Supernode

Once i restarted the device and typed route -n, there is no entry for
the ath0 interface, do we need to manually add this?

Also i dont think batmand is started, how do u do this?

i cannot ping 10.130.1.0/24 network on the ath0 interface.

Could you post the configuration required for the files /etc/config/
network, ../batamnd and ../wireless?

cheers,

wayne

unread,
Jan 21, 2011, 1:30:18 AM1/21/11
to village-...@googlegroups.com
Hi joe

I'm glad you sorted the flash, Please post your
files.
Also ifconfig and iwconfig.
BTW, did you enable the wireless interface? Default is disabled!

To see if batmand is running, ps -aux

to enable batmand at boot: /etc/init.d/batmand enable
to disable firewall /etc/init.d/firewall disable

Wayne

Steve Song

unread,
Jan 21, 2011, 1:52:45 AM1/21/11
to village-...@googlegroups.com
Hi Joe,

Below are the working NS2 configuration files for the supernode in the
Bo-kaap Village Telco. Note that this NS2 does not directly face the
Internet but connects to a Village Telco server connected to the
Internet. The Village Telco server and the NS2 have their own subnet
(192.168.130.xxx) that connects them with the NS2 being 192.168.130.1
and the server 192.168.130.2. You'll see this network announced in
the batmand settings.

/etc/config/wireless
====================

config 'wifi-device' 'wifi0'
option 'type' 'atheros'
option 'channel' '1'

config 'wifi-iface'
option 'device' 'wifi0'
option 'encryption' 'none'
option 'ssid' 'potato'
option 'mode' 'ahdemo'
option 'bssid' '01:CA:FF:EE:BA:BE'
option swmerge 1
option bgscan 0
option 'network' 'wifi0'


/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 'proto' 'static'
option 'ipaddr' '192.168.130.1'
option 'netmask' '255.255.255.0'
option 'gateway' '192.168.130.2'
option 'dns' '192.168.130.2'

config alias
option 'interface' 'lan'
option 'proto' 'static'
option 'ipaddr' '10.30.1.1'
option 'netmask' '255.255.255.0'

config 'interface' 'wifi0'
option 'ifname' 'ath0'
option 'proto' 'static'
option 'ipaddr' '10.130.1.1'
option 'netmask' '255.255.255.0'


/etc/config/batmand
===================

config 'batmand' 'general'
option 'interface' 'ath0'
option 'hna' '192.168.130.0/24'
option 'originator_interval' ''
option 'preferred_gateway' ''
option 'policy_routing_script' ''
option 'disable_client_nat' ''
option 'disable_aggregation' ''
option 'gateway_class' '128'
option 'visualisation_srv' '10.130.1.1'
option 'routing_class' ''

/etc/config/firewall
====================

config defaults
option syn_flood 1
option input ACCEPT
option output ACCEPT
option forward REJECT

# include a file with users custom iptables rules
config include
option path /etc/firewall.user

/etc/firewall.user
==================

# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.
#turn on ip forwarding to let packets pass through
echo 1 > /proc/sys/net/ipv4/ip_forward

#reset iptables
iptables -F
iptables -t nat -F

#set default policies
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT

Cheers... Steve

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

--
Steve Song
Telecommunications Fellow, Shuttleworth Foundation

email:   steve...@shuttleworthfoundation.org
mobile:  +27 83 482 2088
skype:   steve_l_song
blog:    http://manypossibilities.net
next:    http://villagetelco.org
twitter: stevesong

elektra

unread,
Jan 21, 2011, 7:19:20 AM1/21/11
to village-...@googlegroups.com
Hello Joe -


> Once i restarted the device and typed route -n, there is no entry for
> the ath0 interface, do we need to manually add this?

batmand (the mesh routing daemon in the VT environment) is performing policy
routing. Since Linux kernel version 2.2 Linux supports multiple routing
tables. route -n will only look in routing table 255 (default), because the
legacy route command comes from the pre-policy routing time.

With the new advanced routing features a new tool for monitoring and changing
network settings was introduced: ip (short for iproute2)

Perform:

ip r ls table all

to list the content of all routing tables.

ip r ls table 66

will list the content of table 66. This contains all host routes to interfaces
running batmand.

More information is available here:
http://www.open-mesh.org/wiki/RoutingVodoo



>
> Also i dont think batmand is started, how do u do this?

Is batmand installed? If yes, it should start automatically. But you need to
configure at least one interface in /etc/config/batmand.

Cheers,
Elektra

Joe

unread,
Jan 21, 2011, 10:26:25 PM1/21/11
to village-telco-dev
hey guys,

i installed batmand by opkg install batmand.
in /etc/config/network what does "config alias" mean?
[a little side note; how would you configure the interface for the 2nd
ethernet port? config 'interface' 'lan2'?]

batman starts up automatically on reboot with 3 entries displayed by
"ps" --> batman -g 128 -s 10.130.1.1 ath0

wen i enter "batman -d1 -c" i get:

Originator (#/255) Nexthop [outgoingIF]: Potential
nexthops ... [B.A.T.M.A.N. 0.4-alpha rv1439, MainIF/IP: ath0/0.0.0.0,
UT: 0d 0h26m]
No batman nodes in range ...

i think something is wrong with the setup because MainIF/IP should
display ath0/10.130.1.1?

my files are:

----------------
//wireless

root@OpenWrt:~# cat /etc/config/wireless
config wifi-device 'wifi0'
option type 'atheros'
option channel '1'

;option type mac80211
;option macaddr 00:15:6d:18:37:e4
;option hwmode 11ng
;option htmode HT20
;list ht_capab SHORT-GI-40
;list ht_capab TX-STBC
;list ht_capab RX-STBC1
;list ht_capab DSSS_CCK-40
# REMOVE THIS LINE TO ENABLE WIFI:
;option disabled 1

config 'wifi-iface'
option device 'wifi0'
option encryption 'none'
option ssid 'potato'
option mode 'ahdemo'
option bssid '01:CA:FF:EE:BA:BE'
option swmerge '1'
option bgscan '0'
option network 'wifi0'

;option network lan
;option mode ap
;option ssid OpenWrt
;option encryption none

----------------
// network

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 'netmask' '255.255.255.0'
option 'ipaddr' '192.168.1.100'
option 'gateway' '192.168.1.254'
option 'dns' '192.168.1.254'

'config interface wan
'option ifname eth1
'option proto dhcp

config 'interface' 'wifi0'
option 'ifname' 'ath0'
option 'proto' 'static'
option 'netmask' '255.255.255.0'
option 'ipaddr' '10.130.1.1'

------------------
// batmand

root@OpenWrt:~# cat /etc/config/batmand
config 'batmand' general
option 'interface' 'ath0'
option 'hna'
option 'gateway_class' '128'
option 'originator_interval'
option 'preferred_gateway'
option 'routing_class'
option 'visualisation_srv' '10.130.1.1'
option 'policy_routing_script'
option 'disable_client_nat'
option 'disable_aggregation'

//firewall
root@OpenWrt:~# cat /etc/config/firewall
config defaults
option syn_flood 1
option input ACCEPT
option output ACCEPT
option forward REJECT
# Uncomment this line to disable ipv6 rules
# option disable_ipv6 1

#config zone
#option name lan
#option input ACCEPT
#option output ACCEPT
#option forward REJECT

#config zone
#option name wan
#option input REJECT
#option output ACCEPT
#option forward REJECT
#option masq 1
#option mtu_fix 1

#config forwarding
#option src lan
#option dest wan

# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
#config rule
#option src wan
#option proto udp
#option dest_port 68
#option target ACCEPT
#option family ipv4

#Allow ping
#config rule
#option src wan
#option proto icmp
#option icmp_type echo-request
#option target ACCEPT

# include a file with users custom iptables rules
config include
option path /etc/firewall.user

-----------------------
//firewall.user

root@OpenWrt:~# cat /etc/firewall.user
# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.
echo 1 > /proc/sys/net/ipv4/ip_forward

#reset tables
iptables -F
iptables -t nat -F

#set default policies
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT

------------

elektra: when type "ip r ls table all" i get "-ash:ip: not found"

route -n gives:

root@OpenWrt:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref
Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0
0 eth0
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0
0 eth0

what am i doing wrong as i believe there should be an ath0 route entry
added by batmand or something?

cheers,

wayne

unread,
Jan 22, 2011, 1:35:44 AM1/22/11
to village-...@googlegroups.com
Joe wrote:
> hey guys,
>
> i installed batmand by opkg install batmand.
> in /etc/config/network what does "config alias" mean?
> [a little side note; how would you configure the interface for the 2nd
> ethernet port? config 'interface' 'lan2'?]
>
> batman starts up automatically on reboot with 3 entries displayed by
> "ps" --> batman -g 128 -s 10.130.1.1 ath0
>
> wen i enter "batman -d1 -c" i get:
>
> Originator (#/255) Nexthop [outgoingIF]: Potential
> nexthops ... [B.A.T.M.A.N. 0.4-alpha rv1439, MainIF/IP: ath0/0.0.0.0,
> UT: 0d 0h26m]
> No batman nodes in range ...
>
> i think something is wrong with the setup because MainIF/IP should
> display ath0/10.130.1.1?
>
> my files are:

Hi Joe

Amend your files as follows!


>
> ----------------
> //wireless
>
> root@OpenWrt:~# cat /etc/config/wireless
> config wifi-device 'wifi0'
> option type 'atheros'
> option channel '1'
>
> ;option type mac80211
> ;option macaddr 00:15:6d:18:37:e4

> ;option hwmode 11ng !!!!!!!! CHANGE TO 11g

> ;option htmode HT20
> ;list ht_capab SHORT-GI-40
> ;list ht_capab TX-STBC
> ;list ht_capab RX-STBC1
> ;list ht_capab DSSS_CCK-40

Remove the rest

ADD: option antenna vertical

> config 'wifi-iface'
> option device 'wifi0'

option encryption 'none'
> option ssid 'potato'
> option mode 'ahdemo'
> option bssid '01:CA:FF:EE:BA:BE'
> option swmerge '1'
> option bgscan '0'

> option network 'wifi0' !!!!Remove this line
>
> ;option network lan !!!!Remove all these commented lines


> ;option mode ap
> ;option ssid OpenWrt
> ;option encryption none
>
> ----------------
> // network
>
> 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 'netmask' '255.255.255.0'
> option 'ipaddr' '192.168.1.100'
> option 'gateway' '192.168.1.254'
> option 'dns' '192.168.1.254'
>

> 'config interface wan !! Remove stanza completely


> 'option ifname eth1
> 'option proto dhcp
>
> config 'interface' 'wifi0'
> option 'ifname' 'ath0'
> option 'proto' 'static'
> option 'netmask' '255.255.255.0'
> option 'ipaddr' '10.130.1.1'
>
> ------------------
> // batmand
>
> root@OpenWrt:~# cat /etc/config/batmand
> config 'batmand' general
> option 'interface' 'ath0'
> option 'hna'
> option 'gateway_class' '128'
> option 'originator_interval'
> option 'preferred_gateway'
> option 'routing_class'
> option 'visualisation_srv' '10.130.1.1'
> option 'policy_routing_script'
> option 'disable_client_nat'
> option 'disable_aggregation'
>

NB! Do not use the firewall for now, issue a

/etc/init.d/firewall disable

If you read the page that Elektra pointed to you will see that batmand
does NOT show up on the normal route command, this only reveals table
255, batmand runs on other hidden tables, and thus is only seen with the
ip cmd, however I have never had to do this as a user!

Please send your iwconfig, and ifconfig outputs,

As far as the wifi-device is concerned, on all my different equipment,
it ranges from wifi0 to Radio0 depending on if you're using a Kama or
backfire version driver.

The easiest to find that out is go to the GUI, and under wireless the
tab will be named the correct one to use!

Otherwise you're good to go, Please remind me how are your other nodes
running, is there a existing running mesh?


On a side note, batmand seems to be running correctly, but it won't do a
darn thing if your wireless is not setup correctly or actually running!

I would concentrate there!

Wayne A

>
> cheers,
>

Joe

unread,
Jan 25, 2011, 5:11:05 AM1/25/11
to village-telco-dev
hi,

there is a problem with my wireless setup configuration since it seems
like its still disabled or something (i removed that line in ../
wireless)? there is not entry for ath0 from ifconfig..

------------------
root@OpenWrt:/etc/config# ifconfig
eth0 Link encap:Ethernet HWaddr 00:15:6D:19:37:E4
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:
255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:177 errors:0 dropped:0 overruns:0 frame:0
TX packets:94 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:18225 (17.7 KiB) TX bytes:16776 (16.3 KiB)
Interrupt:4

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)


---------------
root@OpenWrt:/etc/config# iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

eth1 no wireless extensions.

wlan0 IEEE 802.11bgn ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=0
dBm
RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on

----------------
"The easiest to find that out is go to the GUI, and under wireless the
tab will be named the correct one to use! " - which GUI? since ive
already reflashed the device

i have tried with both wifi0 and radio0 - no success.

how do we install the ip command on these devices?

-------------
../wireless

config wifi-device wifi0
option type atheros ??????????? is this correct
option channel 1
option macaddr 00:15:6d:18:37:e4
option hwmode 11g
option htmode HT20 ??????????? is this needed was
from the firmware
list ht_capab SHORT-GI-40 ??????????? is this needed was
from the firmware
list ht_capab TX-STBC ??????????? is this needed was from
the firmware
list ht_capab RX-STBC1 ??????????? is this needed was from
the firmware
list ht_capab DSSS_CCK-40 ??????????? is this needed was
from the firmware

config wifi-iface
option device wifi0
option encryption none
option ssid potato
option bssid 01:CA:FF:EE:BA:BE
option swmerge 1
option bgscan 0


help :(

Steve Song

unread,
Jan 25, 2011, 5:52:17 AM1/25/11
to village-...@googlegroups.com
Hi Joe,

In /etc/config/wireless, in the config 'wifi-iface' section, you are
missing a key configuration line which sets the wifi interface into
ahdemo mode

option 'mode' 'ahdemo'

AFAIK you can get rid of all the htmode and ht_capab options.

Do you still have something like

config 'interface' 'wifi0'
option 'ifname' 'ath0'
option 'proto' 'static'

option 'ipaddr' '10.130.1.1'
option 'netmask' '255.255.255.0'

in /etc/config/network?

Cheers... Steve

elektra

unread,
Jan 25, 2011, 6:01:51 AM1/25/11
to village-...@googlegroups.com
Hello Joe -

the device is using a different Atheros driver (ath9k instead of Madwifi). This
driver doesn't name its interfaces ath0 and there is no wifi0 device.

Replace wifi0 with wlan0 - the wireless device is already listed by iwconfig:

> root@OpenWrt:/etc/config# iwconfig
> lo no wireless extensions.
>
> eth0 no wireless extensions.
>
> eth1 no wireless extensions.
>
> wlan0 IEEE 802.11bgn ESSID:off/any
> Mode:Managed Access Point: Not-Associated Tx-Power=0
> dBm
> RTS thr:off Fragment thr:off
> Encryption key:off
> Power Management:on

Cheers,
Elektra

wayne

unread,
Jan 25, 2011, 6:19:14 AM1/25/11
to village-...@googlegroups.com

Hi Joe

If you still have a issue after, try replacing ahdemo with plain Ad-Hoc
, I have had it where some of these don't play ball for some reason.


Wayne A


elektra

unread,
Jan 25, 2011, 6:21:15 AM1/25/11
to village-...@googlegroups.com
Hello -

the ath9k driver supports only adhoc mode, ahdemo mode is not supported - and
it will very likely never get this supported, as beacons are necessary for
802.11n. I am using my laptop with ath9k successfully in our local mesh and I
have no problems connecting to devices operating in ahdemo mode. However this
might change, currently ath9k is operating in 802.11abg mode only when you
switch to ad-hoc. (You will still be able to switch to 802.11abg mode, I'm
sure)

Besides:
Compared to the Madwifi driver in the MP the ath9k driver has only a small set
of features, but it is improving. Recently ath9k and the iw tool (like the ip
command is replacing the ifconfig command, iw is replacing iwconfig) have gained
support for setting the broadcast data rate.

Cheers,
Elektra

wayne

unread,
Jan 25, 2011, 7:28:37 AM1/25/11
to village-...@googlegroups.com


Thanks Elektra

I new there was a issue, I just couldnt remember the circumstances.

Yep now that I've checked, all my nano's run adhoc and Bullets and
potato's run ahdemo!

Question, Is the overhead added substantial? Or are we talking a small
percentage.

Wayne A


Wayne A


elektra

unread,
Jan 25, 2011, 8:36:10 AM1/25/11
to village-...@googlegroups.com
Hello Wayne -

if the node density is high, the overhead is substantial. We have seen 802.11
protocol messages consuming up to 70% of the airtime during events with many
people using WiFi. It is not only a beacon problem. Devices that receive
beacons also send association requests (probe requests), which causes the
transmission of probe responses. Since these messages are send at basic rate
they consume a lot of airtime. As the network becomes messy, stations are
likely to send more probes, because they are desperately trying to associate.
Which is adding gasoline to the fire.

You can measure this with the horst package (start horst.sh) on a MP with
recent firmware or install the package. Or install it on your laptop.

Since there is no ahdemo mode with mac802.11, the only workaround may be to
slow down the beacon interval and increase the broadcast rate (basic rate) in
dense parts of the wireless network. However I am 99% sure that the firmware
you are currently using does not yet have this option. You might be able to
set the beacon interval rate, but I am not sure.

The problem is not ad-hoc specific, it also an issue with accesspoint mode.
With many stations (typical nerd congress situation) the wireless performance
becomes unusable. Unfortunately as a network administrator in a congress hall
you can not ask people to change their multicast rate, as this is a advanced,
non-standard feature. You can only save a bit of bandwidth by setting this on
your APs.

Cheers,
Elektra

wayne

unread,
Jan 25, 2011, 10:39:03 AM1/25/11
to village-...@googlegroups.com

Thanks Elektra

It seems as if this is a substantial problem, And obviously driver specific.

I get the congress situation, Can you possibly estimate the Mean
density, so that we can maybe get an idea of the impact.

If I can change the direction slightly( Not) a quick question that many
people are maybe wondering, I am certainly.

Why can Batmand-adv not be used in a Potato enviroment?

And if it can would this result in lower overhead?


Please forgive, I'm full of questions today.

Have A Great day!

Wayne A

Joe

unread,
Jan 25, 2011, 8:05:26 PM1/25/11
to village-telco-dev
thanks for all the help i think im getting closer :)

i changed /etc/config/batmand to be on the interface wlan0 instead of
ath0. Also changed wifi0 to wlan0 (see my config for wifi interface
now).

--------
/etc/config/network
..
..
config interface wlan0
option ifname wlan0
option proto static
option netmask 255.255.255.0
option ipaddr 10.130.1.1

------------
/etc/config/wireless

config wifi-device "wlan0"
option type "atheros"
option channel "1"
option hwmode "11g"

config wifi-iface
option device "wlan0"
option encryption "none"
option mode "adhoc"
option ssid "potato"
option bssid "01:CA:FF:EE:BA:BE"
option swmerge "1"
option bgscan "0"
option network "wlan0"

-------------
questions:

on the wireless setup for my MPs all the configuration in /etc/config/
wireless in under section "config wifi-device" ie. there is no "config
wifi-iface" as seen in my nanostation setup - just making sure this is
correct?

ifconfig also includes this gate0 interface now..
gate0 Link encap:UNSPEC HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:169.254.0.0 P-t-P:169.254.0.0 Mask:
255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1471 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

iwconfig is still nothing..
wlan0 IEEE 802.11bgn ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=0
dBm
RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on


Wayne could you post your configuration files for network and wireless
so i can compare where im going wrong? you have got these nanostation
m2's working so there must be something im missing??

cheers,
joe





Outback Dingo

unread,
Jan 25, 2011, 8:17:58 PM1/25/11
to village-...@googlegroups.com
Guys these are N devices, the config should look more like

config wifi-device radio0
        option phy              phy0
        option type             mac80211
        option channel          11
        option hwmode           11ng
        option country          'US'
        option htmode           HT20
        list ht_capab           SHORT-GI-40
        list ht_capab           TX-STBC
        list ht_capab           RX-STBC1
        list ht_capab           DSSS_CCK-40

config wifi-iface
        option device           radio0
        option ifname           wlan2
        option network          mesh
        option mode             adhoc
        option ssid             adhocssid
        option 'bssid'      '01:CA:FF:EE:BA:BE'
        option encryption       none
        option rts              250
        option frag             256

config wifi-iface
        option device           radio0
        option ifname           wlan0
        option network          lan
        option mode             ap
        option ssid             APSSID
        option encryption       none



Outback Dingo

unread,
Jan 25, 2011, 8:24:20 PM1/25/11
to village-...@googlegroups.com
 option device   "wlan0" isnt correct, option radio0 or phy0

On Tue, Jan 25, 2011 at 8:05 PM, Joe <romeo...@hotmail.com> wrote:

wayne

unread,
Jan 26, 2011, 12:54:18 AM1/26/11
to village-...@googlegroups.com
OK, here you go, note the radio0 and type difference, this definately
depends on the version used.
As steve said, go to the GUI, and under the wireless the tab that comes
out has the correct name to use!

Note my iwconfig says wlan0 ,also batmand is also wlan0, it's only the
wireless config that refers to radio0.

> lo no wireless extensions.
>
> eth0 no wireless extensions.
>
> eth1 no wireless extensions.
>

> wlan0 IEEE 802.11bgn ESSID:"kranshoek_mesh"
> Mode:Ad-Hoc Frequency:2.412 GHz Cell: 01:CA:FF:EE:BA:BE
> Tx-Power=27 dBm

> RTS thr:off Fragment thr:off
> Encryption key:off

> Power Management:off
>
> gate0 no wireless extensions.


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 'proto' 'static'
> option 'netmask' '255.255.255.0'

> option 'gateway' '192.168.28.1'
> option 'dns' '192.168.2.1'
> option 'ipaddr' '192.168.28.1'
>
> config 'interface' 'wan'
> option 'proto' 'static'
> option 'ifname' 'wlan0'
> option 'ipaddr' '10.130.1.28'
> option 'netmask' '255.255.255.0'
Wireless
But here it is radio0 ( driver dependent)

> config 'wifi-device' 'radio0'
> option 'type' 'mac80211'
> option 'macaddr' '00:15:6d:3a:d7:1d'
> option 'hwmode' '11g'
> list 'ht_capab' 'SHORT-GI-20'


> list 'ht_capab' 'SHORT-GI-40'
> list 'ht_capab' 'TX-STBC'
> list 'ht_capab' 'RX-STBC1'

> list 'ht_capab' 'DSSS_CCK-40'
> option 'channel' '1'
> option 'disabled' '0'
> option 'antenna' 'vertical' # Also important

> config 'wifi-iface'
> option 'device' 'radio0'

> option 'encryption' 'none'
> option 'ssid' 'kranshoek_mesh'


> option 'bssid' '01:CA:FF:EE:BA:BE'

> option 'mode' 'adhoc'
> option 'network' 'wan'


NB. BTW, iwconfig will only show something if the unit is actually
associated to it's mate. What or how are your other nodes running?

Another question, are you using vanilla Backfire?

I have the network options, but if the firewall is disabled, it will not
matter.
I can also confirm Elektra's comment about the firewall, I am still
trying to get that sorted, If I use the firewall and open the batman
ports I can connect fine, but batmand somehow does not send the gateway
rules correctly! I can reach the whole mesh, but nothing further.
Strange, but firewall not really needed on node.


As per Elektra's explanation , using adhoc, try changing both units to
adhoc for setup purposes, then do a

iwlist wlan0 scanning or iwlist ath0 scanning on the potato's.

on both units to see if the units are actually "seeing" each other. This
will only work if both units are on adhoc as ahdemo does not broadcast
any beacons, so you can't see it via scanning.

I can assure you, I have Potato's, Nano's , Nano loco's, bullets,
Pico's, and they ALL run perfectly! Great products.

Wayne A


Joe

unread,
Jan 26, 2011, 7:18:07 AM1/26/11
to village-telco-dev
thankyou all so much for all your help i finally got my nanostation m2
working as a supernode with my mesh network!! :)
wayne the example you posted does the trick. i had to use radio0 and
mac80211 like you did.


im not using vanilla backfire, im not sure what that does.

I have my mesh network on 10.130.1.0/24 (ath0) with the nanostation
configured at 10.130.1.1 (wlan0) & 192.168.1.100 (eth0). I am also
utilising internet/file sharing available to the nanostation (from its
eth0) over my mesh network by configuring

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

i have also setup dhcp on each mesh potato's eth0 interface.


cheers again for your help guys,
joe

Outback Dingo

unread,
Jan 26, 2011, 7:35:10 AM1/26/11
to village-...@googlegroups.com
you mean

option hwmode           11ng

Steve Song

unread,
Jan 26, 2011, 8:01:09 AM1/26/11
to village-...@googlegroups.com
Hi Joe,

Congratulations and kudos to you for persisting! Could you send your
final configuration files and we'll post them on the wiki for the next
person who wants to set up an M2?

Cheers... Steve

> --
> 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,
Jan 26, 2011, 9:15:19 AM1/26/11
to village-...@googlegroups.com
Hello Wayne -


> I get the congress situation, Can you possibly estimate the Mean
> density, so that we can maybe get an idea of the impact.

more than 30 WiFi devices active in range.

> If I can change the direction slightly( Not) a quick question that many
> people are maybe wondering, I am certainly.
>
> Why can Batmand-adv not be used in a Potato enviroment?

It can be used, of course. We have a package for batmand-adv, but it is
outdated. I need to adapt the Makefile - then I will add it to the package list
for recent firmware versions.

> And if it can would this result in lower overhead?

This is not related to the problems of WiFi. Batmand-adv has smaller overhead,
but there are other limitations. Batmand-adv makes the mesh look like all
devices are link local. So you can use zeroconf / bonjour, DHCP, radvd and so
on with batmand-adv. However wireles mesh networks have packet loss,
particularly on multi-hop links. Link-local protocols like zeroconf will have
problems in such a environment and there is also a bandwidth impact.
Developers of link-local protocols think that they can spam the network,
because they can assume the net is high reliability, high speed, high capacity
and hence they can allow wasting bandwidth. This is not true for a layer 2
mesh protocol.

Batmand-adv is a very interesting solution for many applications, but there
are problems scaling to large meshes. If you have only a limited amount of
nodes and a limited number of hops and good link quality it might be a good
solution with very interesting features. (Like WiFi clients roaming between AP
that use the mesh as backbone)

> Please forgive, I'm full of questions today.

Pleasure.

Cheers,
Elektra

wayne

unread,
Jan 26, 2011, 1:47:36 PM1/26/11
to village-...@googlegroups.com
Hi Elektra

elektra wrote:
> Hello Wayne -
>
>
>> I get the congress situation, Can you possibly estimate the Mean
>> density, so that we can maybe get an idea of the impact.
>
> more than 30 WiFi devices active in range.

So quite small really! Interesting. SOme of my Nano's are ranging about
1 KM, so theoretically it would pick up many nodes in a busy enviroment.

>
>> If I can change the direction slightly( Not) a quick question that many
>> people are maybe wondering, I am certainly.
>>
>> Why can Batmand-adv not be used in a Potato enviroment?
>
> It can be used, of course. We have a package for batmand-adv, but it is
> outdated. I need to adapt the Makefile - then I will add it to the package list
> for recent firmware versions.
>
>> And if it can would this result in lower overhead?
>
> This is not related to the problems of WiFi. Batmand-adv has smaller overhead,
> but there are other limitations. Batmand-adv makes the mesh look like all
> devices are link local. So you can use zeroconf / bonjour, DHCP, radvd and so
> on with batmand-adv. However wireles mesh networks have packet loss,
> particularly on multi-hop links. Link-local protocols like zeroconf will have
> problems in such a environment and there is also a bandwidth impact.
> Developers of link-local protocols think that they can spam the network,
> because they can assume the net is high reliability, high speed, high capacity
> and hence they can allow wasting bandwidth. This is not true for a layer 2
> mesh protocol.
>
> Batmand-adv is a very interesting solution for many applications, but there
> are problems scaling to large meshes. If you have only a limited amount of
> nodes and a limited number of hops and good link quality it might be a good
> solution with very interesting features. (Like WiFi clients roaming between AP
> that use the mesh as backbone)
>

Yes , I am following the Bat-adv-dev mailing list but it's slightly
above my level, But I'm starting to get the Jist of it.

I have setup a BAt-adv test, and I was impressed with the first go, Real
monitoring of the mesh as a whole would move to a different level,
especially for the guys that use that mesh for other services also.
I know it's not strictly VT policy, but still reality, and I really find
it difficult to do BW restrictions per port and per node as one clever
customer can flood the mesh easily with no way to restrict automatically
without influencing call quality.
MAybe I've got to start learning real IPTABLES.

> Pleasure.
>

Thanks again, I always appreciate your FULL explanations, I just wonder
where you get all the time for us Dwarfs.

Wayne A

Joe

unread,
Jan 26, 2011, 6:50:06 PM1/26/11
to village-telco-dev
Hi steve,

1. Flash the device with a version of the OpenWRT firmware (see
http://groups.google.com/group/village-telco-dev/browse_thread/thread/9239b1866ae87597)
2. Telnet to the device at 192.168.1.1 and type passwd to enable ssh
login
3. Install batman, type
opkg update
opkg install batmand
4. Configure batmand to auto start, type /etc/init.d/batmand enable
5. Disable the firewall (for now), type /etc/init.d/firewall disable
6. Configure the interfaces files as shown below
7. Enable the MP to be a gateway by setting up network address
translation (NAT) using iptables. Edit the file /etc/init.d/network.
Insert the following line of text as the last line in the sections
“boot”, “start” and “restart”:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

-------------------------
/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 proto static
option ipaddr 192.168.1.100
option netmask 255.255.255.0
option gateway 192.168.1.1
option dns 192.168.1.1

config interface wan
option ifname wlan0
option proto static
option ipaddr 10.130.1.1
option netmask 255.255.255.0

--------------------------
/etc/config/wireless
--------------------------
config wifi-device radio0
option type mac80211
option macaddr 00:15:6d:18:37:e4
option hwmode 11g
list ht_capab SHORT-GI-20
list ht_capab SHORT-GI-40
list ht_capab TX-STBC
list ht_capab RX-STBC1
list ht_capab DSSS_CCK-40
option channel 1
option disabled 0
option antenna vertical

config wifi-iface
option device radio0
option network wan
option mode adhoc
option ssid potato
option bssid 01:CA:FF:EE:BA:BE
option encryption none

---------------------------
/etc/config/batmand
---------------------------
config batmand general
option interface wlan0
option hna
option gateway_class 128
option originator_interval
option preferred_gateway
option routing_class
option visualisation_srv 10.130.1.1
option policy_routing_script
option disable_client_nat
option disable_aggregation

cheers,
Joe

Joe

unread,
Jan 26, 2011, 6:53:47 PM1/26/11
to village-telco-dev
step 7 should be edit the file on the nanostation supernode NOT the
mp.

cheers

Steve Song

unread,
Jan 27, 2011, 10:19:25 AM1/27/11
to village-...@googlegroups.com
Thanks Joe. I've created a section for default configurations of other
devices as VT nodes. Yours is up at

http://wiki.villagetelco.org/index.php?title=Default_Configurations_for_Other_APs#Setting_up_an_Ubiquiti_Nanostation_M2_as_a_Village_Telco_Supernode

Cheers... Steve

Reply all
Reply to author
Forward
0 new messages