public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] Batman-adv simple configuration example
@ 2012-05-01 19:06 Pedro Nuno Costa Rodrigues
  2012-05-01 19:34 ` Sven Eckelmann
  0 siblings, 1 reply; 8+ messages in thread
From: Pedro Nuno Costa Rodrigues @ 2012-05-01 19:06 UTC (permalink / raw)
  To: b.a.t.m.a.n

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

Hello!

Sorry about taking your time, but i really need some help...

First of all, sorry about my english, i will try to express the better i can.
I send this need of help for you and for the others developers  
envolved in the batman-adv project, hoping some reply.

My name is Pedro, and i'm writing from Portugal, Oporto.
I'm a student of telecomunications and i'm doing the last work to  
finish my master thesis. It was proposed to me in my school doing a  
management aplication for a batman-adv mesh network... by the way my  
school is ISEP - Oporto Superior Institute of Engeneering.

In this moment i'm trying to setup a basic 2 nodes using batman-adv...
I'm using UBUNTU 10.10 - linux.
I'm using OPENWRT in 2 routers.
The routers are 2 linksys wrt54gs (v1.1 and v3).
I compiled the backfire stable release from:

svn co svn://svn.openwrt.org/openwrt/branches/backfire

Here are my feeds:

src-svn packages  
svn://svn.openwrt.org/openwrt/branches/packages_10.03.2  
svn://svn.openwrt.org/openwrt/packages
src-svn luci  
http://svn.luci.subsignal.org/luci/branches/luci-0.10/contrib/package

I installed the kmod-batman-adv.

I attached a image with a scheme from my test configuration.

..................

When i do:

root@OpenWrt:~# batctl if
br-lan: active
wlan0: active

the two interfaces are active... it seems ok!


root@OpenWrt:~# batctl o
[B.A.T.M.A.N. adv 2012.0.0, MainIF/MAC: br-lan/00:13:10:7c:da:71 (bat0)]
   Originator      last-seen (#/255)           Nexthop [outgoingIF]:    
Potential nexthops ...
00:06:25:00:63:7b    0.412s   (247) 00:06:25:00:63:7b [     wlan0]:  
00:06:25:00:63:7b (247)
00:06:25:00:63:79    0.076s   (246) 00:06:25:00:63:7b [     wlan0]:  
00:06:25:00:63:7b (246)


the node 1 see the node 2... it seems ok!


Here is my /etc/config files for router 1, that is supossed to work as  
a batman-adv gateway:

root@OpenWrt:/etc/config# vi batman-adv
config 'mesh' 'bat0'
         option 'interfaces' 'wifi lan'
         option 'aggregated_ogms' '1'
         option 'ap_isolation' '0'
         option 'bonding' '0'
         option 'fragmentation' '1'
         option 'gw_bandwidth' '5mbit/1024kbit'
         option 'gw_mode' 'server'
         #option 'gw_sel_class'
         option 'log_level' 'all'
         option 'orig_interval' '1000'
         option 'vis_mode' 'server'

after the boot when i do:

root@OpenWrt:~# batctl gw
off

then i do:
root@OpenWrt:~# batctl gw server 5mbit
root@OpenWrt:~# batctl gw
server (announced bw: 4MBit/1024KBit)

should't be necessary do "batctl gw server 5mbit"... it already is  
determinated in the /etc/config/batman-adv... why this happens?

also with the vis mode:

root@OpenWrt:~# batctl vm
client

then i do:

root@OpenWrt:~# batctl vm server
root@OpenWrt:~# batctl vm
server

the same thing happens... why?  ----- the gw definition and the vm  
definition is mandatory to router 2 access internet? or doesn't matter?

here is is my /etc/config files for router 2, that is supossed to work  
as a batman-adv gateway client:

root@OpenWrt:~# vi /etc/config/batman-adv
config 'mesh' 'bat0'
         option 'interfaces' 'wifi lan'
         option 'aggregated_ogms' '1'
         option 'ap_isolation' '0'
         option 'bonding' '0'
         option 'fragmentation' '1'
         #option 'gw_bandwidth'
         option 'gw_mode' 'client'
         option 'gw_sel_class' '2'
         option 'log_level' 'all'
         option 'orig_interval' '1000'
         option 'vis_mode' 'client'

is the file ok?

when i do in node 2:

root@OpenWrt:~# batctl if
br-lan: active
wlan0: active

root@OpenWrt:~# batctl o
[B.A.T.M.A.N. adv 2012.0.0, MainIF/MAC: br-lan/00:06:25:00:63:79 (bat0)]
   Originator      last-seen (#/255)           Nexthop [outgoingIF]:    
Potential nexthops ...
00:13:10:7c:da:71    0.916s   (235) 00:13:10:7c:da:73 [     wlan0]:  
00:13:10:7c:da:73 (235)
00:13:10:7c:da:73    0.080s   (235) 00:13:10:7c:da:73 [     wlan0]:  
00:13:10:7c:da:73 (235)


it seems ok...

root@OpenWrt:~# batctl gw
off
  doesn't seem ok...


then i do:

root@OpenWrt:~# batctl gw client 2
root@OpenWrt:~# batctl gw
client (selection class: 2)

root@OpenWrt:~# batctl vm client
root@OpenWrt:~# batctl vm
client


the gw and vm doesn't start/boot with the start configuration... it's  
the same problem...
why this happens? it's crucial for the batman-adv works correctly?

____________________________________________________________
_____end________________________________________________________
____________________________________________________________

Here is my  network file for router 1 and 2 ( the only difference is  
"lan option ipaddr" and the "wifi option ipaddr"...
Question: is necessary to wifi (wlan0) have static ipaddr or it shouldn't?
The mtu size is ok?



root@OpenWrt:/etc/config# vi network
#### VLAN configuration
config switch eth0
         option enable   1

config switch_vlan eth0_0
         option device   "eth0"
         option vlan     0
         option ports    "1 2 3 4 5"

config switch_vlan eth0_1
         option device   "eth0"
         option vlan     1
         option ports    "0 5"              ######## for V3 is "4 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 type     bridge
         option ifname   "eth0.0 bat0 wlan0"
         option proto    static
         option ipaddr   10.3.1.1                #######for router 2  
is 10.3.1.2
         option netmask  255.255.255.0
         option broadcast 10.3.1.255
         option mtu      1500

#### WLAN configuration
config interface        wifi
         option proto    static
         option ifname   "wlan0"
         option ipaddr   10.1.1.1              ########for router 2 is 10.1.1.2
         option netmask  255.255.255.0
         option mtu      1528

#### WAN configuration
config interface        wan
         option ifname   "eth0.1"
         option proto    dhcp

#### BAT configuration
config interface        bat
         option ifname   "bat0"
         option proto    none
         option mtu      1500
___________________________________________________
__end_________________________________________________
_____________________________________________________


Here is the dhcp file:
P.S. i can access the internet through the eth0.0 (ethernet cable)  
both in router 1 and router 2, but i can't access through wireless  
(neither router 1 and router 2)...
Both routers give IP through cable and trough wireless... the  
conections are always made, and it's possible to access using ssh both  
routers, doesn't matter if the connection is made by cable or by  
air... the difference is to access to internet... only works by cable  
in both routers with the scheme i attached...

Is possible to exist conflict with the IP distribution, because the  
"option authoritative    1"?

Is necessary to change some settings?
It is necessary wifi dhcp to the wireless stations to connect? or  
should they manually set an static IP?



root@OpenWrt:/etc/config# vi dhcp
config dnsmasq
         option domainneeded     1
         option boguspriv        1
         option filterwin2k      0  # enable for dial on demand
         option localise_queries 1
         option rebind_protection 1  # disable if upstream must serve  
RFC1918 addresses
         option rebind_localhost 1  # enable for RBL checking and  
similar services
         #list rebind_domain example.lan  # whitelist RFC1918  
responses for domains
         option local    '/lan/'
         option domain   'lan'
         option expandhosts      1
         option nonegcache       0
         option authoritative    1
         option readethers       1
         option leasefile        '/tmp/dhcp.leases'
         option resolvfile       '/tmp/resolv.conf.auto'
         #list server            '/mycompany.local/1.2.3.4'
         #option nonwildcard     1
         #list interface         br-lan
         #list notinterface      lo
         #list bogusnxdomain     '64.94.110.11'

config dhcp lan
         option interface        lan
         option start    51               #########for router 2 is start 101
         option limit    70               #########for router 2 is limit 130
         #option leasetime       12h

config dhcp wan
         option interface        wan
         option ignore   1

config dhcp wifi
         option interface wifi
         option start    51                #########for router 2 is start 101
         option limit    70                #########for router 2 is limit 130

_______________________________________________
______end_______________________________________________
__________________________________________________

Here is my /etc/config/firewall:

what do you think? it's ok?


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

config zone
         option name             lan
         option network          'lan'
         option input            ACCEPT
         option output           ACCEPT
         option forward          ACCEPT

config zone
         option name             wan
         option network          'wan'
         option input            ACCEPT
         option output           ACCEPT
         option forward          ACCPET
         option masq             1
         option mtu_fix          1

config forwarding
         option src              lan
         option dest             wan

config forwarding
         option src              wan
         option dest             lan

config forwarding
         option src              wifi
         option dest             wan

config forwarding
         option src              wan
         option dest             wifi

config forwarding
         option src               lan
         option dest              wifi

config forwarding
         option src               wifi
         option dest              lan


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

# Allow IPv4 ping
config rule
         option name             Allow-Ping
         option src              wan
         option proto            icmp
         option icmp_type        echo-request
         option family           ipv4
         option target           ACCEPT

# Allow DHCPv6 replies
# see https://dev.openwrt.org/ticket/10381
config rule
         option name             Allow-DHCPv6
         option src              wan
         option proto            udp
         option src_ip           fe80::/10
         option src_port         547
         option dest_ip          fe80::/10
         option dest_port        546
         option family           ipv6
         option target           ACCEPT

# Allow essential incoming IPv6 ICMP traffic
config rule
         option name             Allow-ICMPv6-Input
         option src              wan
         option proto    icmp
         list icmp_type          echo-request
         list icmp_type          destination-unreachable
         list icmp_type          packet-too-big
         list icmp_type          time-exceeded
         list icmp_type          bad-header
         list icmp_type          unknown-header-type
         list icmp_type          router-solicitation
         list icmp_type          neighbour-solicitation
         option limit            1000/sec
         option family           ipv6
         option target           ACCEPT

# Allow essential forwarded IPv6 ICMP traffic
config rule
         option name             Allow-ICMPv6-Forward
         option src              wan
         option dest             *
         option proto            icmp
         list icmp_type          echo-request
         list icmp_type          destination-unreachable
         list icmp_type          packet-too-big
         list icmp_type          time-exceeded
         list icmp_type          bad-header
         list icmp_type          unknown-header-type
         option limit            1000/sec
         option family           ipv6
         option target           ACCEPT

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

_____________________________________
_____end_____________________________________
__________________________________________


Finally here is my /etc/config/wireless file:

I also have some questions here...
Is necessary the both routers have the same BSSID? Is mandatory to  
have BSSID, or isn't mandatory to aggregate a batman-adv mesh network?
"option network wifi" is correct or should be "option network lan"?



root@OpenWrt:/etc/config# vi wireless
config wifi-device  radio0
         option type     mac80211
         option channel  6
         option phy      phy0
         option hwmode   11g
         option country  PT
         option txpower  20
         option disabled 0



config wifi-iface
         option device   radio0
         option network  wifi
         option mode     adhoc
         option ssid     PR
         option bssid    00:13:10:7c:da:71
         option encryption none

________________________________
______end___________________________
___________________________________


This is it...
Perhaps you don't have the time to analyze all this...
I'm about two months to get this thing done... but i am not capable...
I already asked to my colleagues and to my teachers, but they don't  
know how to...
It's my job...
So i decided to ask for your help, otherwise i think i don't get there  
only by myself... i can't find nothing concrete about these  
configurations anywhere...

Could you please give some light?
I would be very appreciate, and of course i would refer your kindness  
and contribution in the greetings section of my thesis...
Thank you very much.
Best regards and good work.
Pedro Rodrigues
Portugal, Europe



[-- Attachment #2: Scheme_bat-adv.jpg --]
[-- Type: image/jpeg, Size: 42528 bytes --]

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

* Re: [B.A.T.M.A.N.] Batman-adv simple configuration example
  2012-05-01 19:06 Pedro Nuno Costa Rodrigues
@ 2012-05-01 19:34 ` Sven Eckelmann
  2012-05-07 18:17   ` Guido Iribarren
  0 siblings, 1 reply; 8+ messages in thread
From: Sven Eckelmann @ 2012-05-01 19:34 UTC (permalink / raw)
  To: b.a.t.m.a.n

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

Some questions here can be answered by reading the documentation section under 
http://www.open-mesh.org/wiki/batman-adv/ - I will not mention it in this 
text. Please just check it out and read about things like "gateway support" 
and so on.

Many, many, many things in this mail are not batman-adv related. Most of them 
are either OpenWRT specific or normal linux routing stuff. So I will not 
extensively answer to this kind of questions.

On Tuesday 01 May 2012 20:06:45 Pedro Nuno Costa Rodrigues wrote:
> In this moment i'm trying to setup a basic 2 nodes using batman-adv...
> I'm using UBUNTU 10.10 - linux.
> I'm using OPENWRT in 2 routers.
> The routers are 2 linksys wrt54gs (v1.1 and v3).

Did you check that adhoc between both routers work without batman-adv? (bcast 
and unicast)

> When i do:
> 
> root@OpenWrt:~# batctl if
> br-lan: active
> wlan0: active

Please don't add bridges to batman-adv unless you absolutely know what you are 
doing.

And never add bridges to an batman-adv interface that has the same batman-adv 
interface as port.

[...]
> the same thing happens... why?  ----- the gw definition and the vm
> definition is mandatory to router 2 access internet? or doesn't matter?

No, vm is for the visualization server/client configuration (i doubt that you 
are using it with two nodes). The gateway is only for a special dhcp handling 
when you have multiple dhcp servers running and want that clients use the dhcp 
server with the "best" connection.

> here is is my /etc/config files for router 2, that is supossed to work
> as a batman-adv gateway client:
> 
> root@OpenWrt:~# vi /etc/config/batman-adv
> config 'mesh' 'bat0'
>          option 'interfaces' 'wifi lan'
>          option 'aggregated_ogms' '1'
>          option 'ap_isolation' '0'
>          option 'bonding' '0'
>          option 'fragmentation' '1'
>          #option 'gw_bandwidth'
>          option 'gw_mode' 'client'
>          option 'gw_sel_class' '2'
>          option 'log_level' 'all'
>          option 'orig_interval' '1000'
>          option 'vis_mode' 'client'
> 
> is the file ok?

Propably not... see the part about "lan" bridge interface above.

> when i do in node 2:
> 
> root@OpenWrt:~# batctl if
> br-lan: active
> wlan0: active

Same here.

[....]
> the gw and vm doesn't start/boot with the start configuration... it's
> the same problem...
> why this happens? it's crucial for the batman-adv works correctly?

I am no OpenWRT developer, so I can't tell you anything about the startup 
problems in OpenWRT. But the meaning of vm and gw was explained above and is 
not really needed to "have internet access".


> Here is my  network file for router 1 and 2 ( the only difference is
> "lan option ipaddr" and the "wifi option ipaddr"...
> Question: is necessary to wifi (wlan0) have static ipaddr or it shouldn't?
> The mtu size is ok?

MTU is not ok because you added br-lan with the mtu 1500. The mtu of wifi 
should be ok.

[...]
> #### LAN configuration
> config interface lan
>          option type     bridge
>          option ifname   "eth0.0 bat0 wlan0"

This looks like a local packet loop created by your bat0 in bridge, bridge in 
bat0 cycle. It is also weird that you have wlan0 as adhoc interface for batman 
and as client interface. Maybe you want to split it into two different ones.

One for adhoc+batman-adv and one for client access (AP mode)

[...]
> root@OpenWrt:/etc/config# vi dhcp
> config dnsmasq
>          option domainneeded     1
>          option boguspriv        1
>          option filterwin2k      0  # enable for dial on demand
>          option localise_queries 1
>          option rebind_protection 1  # disable if upstream must serve
> RFC1918 addresses
>          option rebind_localhost 1  # enable for RBL checking and
> similar services
>          #list rebind_domain example.lan  # whitelist RFC1918
> responses for domains
>          option local    '/lan/'
>          option domain   'lan'
>          option expandhosts      1
>          option nonegcache       0
>          option authoritative    1
>          option readethers       1
>          option leasefile        '/tmp/dhcp.leases'
>          option resolvfile       '/tmp/resolv.conf.auto'
>          #list server            '/mycompany.local/1.2.3.4'
>          #option nonwildcard     1
>          #list interface         br-lan
>          #list notinterface      lo
>          #list bogusnxdomain     '64.94.110.11'
> 
> config dhcp lan
>          option interface        lan
>          option start    51               #########for router 2 is start 101
> option limit    70               #########for router 2 is limit 130 #option
> leasetime       12h
> 
> config dhcp wan
>          option interface        wan
>          option ignore   1
> 
> config dhcp wifi
>          option interface wifi
>          option start    51                #########for router 2 is start
> 101 option limit    70                #########for router 2 is limit 130

Why is there a special wifi configuration here? You have a br-lan config that 
already includes the wifi interface.

> Finally here is my /etc/config/wireless file:
> 
> I also have some questions here...
> Is necessary the both routers have the same BSSID? Is mandatory to
> have BSSID, or isn't mandatory to aggregate a batman-adv mesh network?

batman-adv isn't interested in the bssid. It just needs a common broadcast 
domain for its ethernet frames.

The interface is in adhoc mode... this means that the bssid here is the 
cellid. Both nodes will only be in the same "network" when the cellids are the 
same.

[...]

Just my two cents. You should try to analyze parts of your setup without doing 
the complete setup at ones. So, check the different links, send some ping 
packets here and find the problematic part. Otherwise it is extreme hard to 
debug this thing.

Kind regards,
	Sven

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

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

* Re: [B.A.T.M.A.N.] Batman-adv simple configuration example
  2012-05-01 19:34 ` Sven Eckelmann
@ 2012-05-07 18:17   ` Guido Iribarren
  0 siblings, 0 replies; 8+ messages in thread
From: Guido Iribarren @ 2012-05-07 18:17 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Tue, May 1, 2012 at 4:34 PM, Sven Eckelmann <sven@narfation.org> wrote:
> Some questions here can be answered by reading the documentation section under
> http://www.open-mesh.org/wiki/batman-adv/ - I will not mention it in this
> text. Please just check it out and read about things like "gateway support"
> and so on.
>
In case you're still fighting with this, I've just added to the
documentation some "simple configuration examples" that actually work.
http://www.open-mesh.org/wiki/batman-adv/Openwrt-config-examples

While the examples are a bit more complex since it handles up to 3
radios per node, you can understand the logic in there (how is the
bridge setup, and which interfaces are added to bat0) and scale it
down.

Hope that helps,

On Tue, May 1, 2012 at 4:06 PM, Pedro Nuno Costa Rodrigues
<pedroncr@sapo.pt> wrote:
> #### WLAN configuration
> config interface        wifi
>        option proto    static
>        option ifname   "wlan0"
>        option ipaddr   10.1.1.1              ########for router 2 is
> 10.1.1.2
>        option netmask  255.255.255.0
>        option mtu      1528

You should never assign an IP to an interface which forms part of a
bridge, or is managed by batman-adv (i.e. it was added to bat0)

that config snippet should only have ifname, mtu and proto(=none)

Cheers!

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

* Re: [B.A.T.M.A.N.] Batman-adv simple configuration example
       [not found] ` <43098025.shuUEIUiJR@sven-desktop.home.narfation.org>
@ 2012-05-10 21:48   ` Pedro Nuno Costa Rodrigues
  2012-05-10 21:55     ` Sven Eckelmann
                       ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Pedro Nuno Costa Rodrigues @ 2012-05-10 21:48 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking


Hello again!
First of all thank's Sven Eckelmann and Guido Iribarren for your
replies and for the attention in my issue.
I would like to say that i already found the solution, as you can see below.
I couldn't split the radios on the wireless network, because i'm using
only chips broadcom (and it isn't possible to have more than 1 radio
interface). When i said that i only need a simple two router network,
doesn't mean that i only going to use 2 routers... the gold is to use
many of them in a mesh network, but i needed to start with a simple 2
mesh configuration router configuration.
After some configuration, it worked correctly in ad-hoc mode... and to
the clients access the mesh through wireless i´m going to use another
router linked by cable (ethernet) using lan ports, with dd-wrt
firmware (or something like that) as a AP -access point (only used to
forward the signal to wireless). By cable it isn't necessary an access
point, only plug the cable in batman-adv node.
I'm using backfire (openwrt build):
cat /home/pedro/backfire/feeds/packages/net/batman-adv/Makefile | grep
2012# Copyright (C) 2010-2012
OpenWrt.orgPKG_VERSION:=2012.0.0BATCTL_VERSION:=2012.0.0
The batman-adv-devel version didn't work...:
In the:https://dev.openwrt.org/wiki/GetSource
downloaded: svn co svn://svn.openwrt.org/openwrt/trunk/
with this feed in feeds.conf.default:src-svn batman
http://downloads.open-mesh.org/svn/openwrt-feed/

(i know this is a issue related with openwrt, but i must explain how i did)
this is the version of the batman-adv-devel:cat
/home/pedro/trunk/feeds/packages/net/batman-adv/Makefile | grep
2012PKG_VERSION:=2012.1.0BATCTL_VERSION:=2012.1.0
root@OpenWrt:~# batctl -vbatctl 54b7d54 [batman-adv: master-b0f3829]
the error was using the same configurations file (below) that worked
with batman-adv backfire stable release:
root@OpenWrt:/lib/batman-adv# batman-adv start/usr/sbin/batman-adv:
eval: line 1: can't create /sys/class/net/bat0/mesh/orig_interval:
nonexistent directory/usr/sbin/batman-adv: eval: line 1: can't create
/sys/class/net/bat0/mesh/log_level: nonexistent
directory/usr/sbin/batman-adv: eval: line 1: can't create
/sys/class/net/bat0/mesh/bonding: nonexistent
directory/usr/sbin/batman-adv: eval: line 1: can't create
/sys/class/net/bat0/mesh/fragmentation: nonexistent
directory/usr/sbin/batman-adv: eval: line 1: can't create
/sys/class/net/bat0/mesh/gw_bandwidth: nonexistent
directory/usr/sbin/batman-adv: eval: line 1: can't create
/sys/class/net/bat0/mesh/gw_mode: nonexistent
directory/usr/sbin/batman-adv: eval: line 1: can't create
/sys/class/net/bat0/mesh/vis_mode: nonexistent
directory/usr/sbin/batman-adv: eval: line 1: can't create
/sys/class/net/bat0/mesh/ap_isolation: nonexistent directory

I tryed to analyze if the problem was with the  "crc16" lib in the
configuration files, but it wasn't... the configuration files were
like the backfire stable release...
pedro@rodrigues:~/trunk/feeds/packages/net/batman-adv/files/lib/batman-adv$ vi
config.sh 
#!/bin/sh
bat_load_module(){        [ -d "/sys/module/batman_adv/" ] && return
        . /etc/functions.sh        load_modules /etc/modules.d/*-crc16
/etc/modules.d/*-batman-adv*}
etc..........
This is a issue to analyze...

Going back to the stable release that worked fine:
this is the server file of batman-adv configuration(with # comment is
the client version modifications):
root@OpenWrt:/etc/config# vi batman-advconfig 'mesh' 'bat0'        
option 'interfaces' 'wifi'        option 'aggregated_ogms' '1'       
option 'ap_isolation' '0'        option 'bonding' '0'        option
'fragmentation' '1'        option 'gw_bandwidth' '5mbit/1024kbit'
#comented line in client mode        option 'gw_mode' 'server'        
     #'client'        #option 'gw_sel_class'                 #option
'gw_sel_class' '2'         option 'log_level' 'all'        option
'orig_interval' '1000'        option 'vis_mode' 'server'            
#option 'vis_mode' 'client'
------------------------------------
this is the dhcp configuration:
root@OpenWrt:/etc/config# vi dhcpconfig dnsmasq        option
domainneeded     1        option boguspriv        1        option
filterwin2k      0  # enable for dial on demand        option
localise_queries 1        option rebind_protection 1  # disable if
upstream must serve RFC1918 addresses        option rebind_localhost 1
 # enable for RBL checking and similar services        #list
rebind_domain example.lan  # whitelist RFC1918 responses for domains 
      option local    '/lan/'        option domain   'lan'       
option expandhosts      1        option nonegcache       0       
option authoritative    1        option readethers       1       
option leasefile        '/tmp/dhcp.leases'        option resolvfile  
    '/tmp/resolv.conf.auto'        #list server          
 '/mycompany.local/1.2.3.4'        #option nonwildcard     1       
#list interface         br-lan        #list notinterface      lo     
  #list bogusnxdomain     '64.94.110.11'
config dhcp lan        option interface        lan        option start
   51        option limit    70        #option leasetime      
12h	option force	1   #this line is only for server router, the        
                    #one who is going to distribute the IP's to the
clients 
config dhcp wan        option interface        wan        option ignore   1
____________________________________

this is the network file configuration:

root@OpenWrt:/etc/config# vi network#### VLAN configurationconfig
switch eth0        option enable   1
config switch_vlan eth0_0        option device   "eth0"        option
vlan     0        option ports    "1 2 3 4 5"
config switch_vlan eth0_1        option device   "eth0"        option
vlan     1        option ports    "0 5"                   
#### Loopback configurationconfig interface loopback        option 
ifname   "lo"        option proto    static        option ipaddr  
127.0.0.1        option netmask  255.0.0.0

#### LAN configurationconfig interface lan        option type    
bridge        option ifname   "eth0.0 bat0 wlan0"        option proto
   static        option ipaddr   10.3.1.1                #10.3.1.X for
other routers        option netmask  255.255.255.0        option
broadcast 10.3.1.255        option mtu      1500
#### WLAN configurationconfig interface        wifi        option
proto    none        option ifname   "wlan0"        #option ipaddr  
10.1.1.1        #option netmask  255.255.255.0        option mtu    
 1528
#### WAN configuration                config interface        wan    
              option ifname   "eth0.1"              option proto  
 dhcp  

________________________________-
this is the wireless file configuration:
root@OpenWrt:/etc/config# vi wirelessconfig wifi-device  radio0       
option type     mac80211        option channel  6        option phy  
   phy0        option hwmode   11g        option country  PT       
option txpower  20        option disabled 0


config wifi-iface        option device   radio0        option network
 wifi        option mode     adhoc        option ssid     PR       
option bssid XX:XX:XX:XX:XX:XX   #the bssid must be the same in all
routers        option encryption none

______________________________________-

all these configuration files are located in "/etc/config".

As you can see the mesh interface is the wireless "wifi":the bat0
interface it appears only in the lan bridge;and it worked fine.
root@OpenWrt:/etc/config# batctl if     wlan0: active
root@OpenWrt:/etc/config# batctl o [B.A.T.M.A.N. adv 2012.0.0,
MainIF/MAC: wlan0/00:13:10:7c:da:73 (bat0)]  Originator      last-seen
(#/255)           Nexthop [outgoingIF]:   Potential nexthops
...00:06:25:00:63:7b    0.228s   (246) 00:06:25:00:63:7b [     wlan0]:
00:06:25:00:63:7b (246)
root@OpenWrt:/etc/config# batctl vd dotdigraph {	"00:13:10:7c:da:73"
-> "00:06:25:00:63:7b" [label="1.000"]	"00:13:10:7c:da:73" ->
"76:0f:22:e4:5f:d8" [label="TT"]	subgraph "cluster_00:13:10:7c:da:73"
{		"00:13:10:7c:da:73" [peripheries=2]	}	"00:06:25:00:63:7b" ->
"00:13:10:7c:da:73" [label="1.214"]	"00:06:25:00:63:7b" ->
"56:71:dc:31:13:2c" [label="TT"]	subgraph "cluster_00:06:25:00:63:7b"
{		"00:06:25:00:63:7b" [peripheries=2]	}} using the xdot ubuntu
application it made the figure (.png) that shows the batman-adv mesh
picture.

The only thing that didn't start with the boot of the routers was
the:-option 'gw_bandwidth' '5mbit/1024kbit'-option 'gw_mode'
'server'-option 'vis_mode' 'server'
it was necessary to start manually... the rest worked weel in the
boot.Just one thing before i forget... the router "server" must be the
first one to start (switch on)... we must wait until it finish the
boot and then we can start the client router...(the problem is
probably the definition who is the master -IP distribution and so
on...)(i used the "option force 1 in the dhcp configuration file, but
didn't worked...) if we start the client first it will not be possible
to access the internet, supposed the ISP is connected with the
"server" router... the ad-hoc mode and the mesh network works the same
way (works fine)... is a issue to study (yes i know that is a openwrt
problem, and there are a bunch of openwrt problems here).My gold is to
contribute with something here, and to get my job done as well.
For now i stay here, and thank you for your lights and publications,
they helped me a lot!!
Best regards,Pedro Rodrigues - Portugal

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

* Re: [B.A.T.M.A.N.] Batman-adv simple configuration example
  2012-05-10 21:48   ` [B.A.T.M.A.N.] Batman-adv simple configuration example Pedro Nuno Costa Rodrigues
@ 2012-05-10 21:55     ` Sven Eckelmann
  2012-05-10 21:57     ` Pedro Nuno Costa Rodrigues
  2012-05-11  6:59     ` Marek Lindner
  2 siblings, 0 replies; 8+ messages in thread
From: Sven Eckelmann @ 2012-05-10 21:55 UTC (permalink / raw)
  To: b.a.t.m.a.n

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

On Thursday 10 May 2012 22:48:54 Pedro Nuno Costa Rodrigues wrote:
[]
> Best regards,Pedro Rodrigues - Portugal

The line endings are completely broken in your mail. It is so hard to read 
that I stopped after the second paragraph.

Kind regards,
	Sven

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

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

* Re: [B.A.T.M.A.N.] Batman-adv simple configuration example
  2012-05-10 21:48   ` [B.A.T.M.A.N.] Batman-adv simple configuration example Pedro Nuno Costa Rodrigues
  2012-05-10 21:55     ` Sven Eckelmann
@ 2012-05-10 21:57     ` Pedro Nuno Costa Rodrigues
  2012-05-11  6:59     ` Marek Lindner
  2 siblings, 0 replies; 8+ messages in thread
From: Pedro Nuno Costa Rodrigues @ 2012-05-10 21:57 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

I didn't know how it happens...

It was very organized with me...

I see what can i do...

Pedro Rodrigues

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

* Re: [B.A.T.M.A.N.] Batman-adv simple configuration example
  2012-05-10 21:48   ` [B.A.T.M.A.N.] Batman-adv simple configuration example Pedro Nuno Costa Rodrigues
  2012-05-10 21:55     ` Sven Eckelmann
  2012-05-10 21:57     ` Pedro Nuno Costa Rodrigues
@ 2012-05-11  6:59     ` Marek Lindner
  2012-05-12 15:08       ` Pedro Nuno Costa Rodrigues
  2 siblings, 1 reply; 8+ messages in thread
From: Marek Lindner @ 2012-05-11  6:59 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Friday, May 11, 2012 05:48:54 Pedro Nuno Costa Rodrigues wrote:
> I'm using backfire (openwrt build):
> cat /home/pedro/backfire/feeds/packages/net/batman-adv/Makefile | grep  
> 2012# Copyright (C) 2010-2012  
> OpenWrt.orgPKG_VERSION:=2012.0.0BATCTL_VERSION:=2012.0.0

You are trying to mix 2 different branches: backfire + trunk batman-adv
 * the batman-adv package coming with backfire is working fine with backfire
 * the batman-adv package from trunk works fine with trunk

Mixing the package with another branch is officially unsupported because there 
are some OpenWrt incompatibilities we can't not automatically handle. It 
certainly is doable but requires deeper knowledge of OpenWrt.

Cheers,
Marek

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

* Re: [B.A.T.M.A.N.] Batman-adv simple configuration example
  2012-05-11  6:59     ` Marek Lindner
@ 2012-05-12 15:08       ` Pedro Nuno Costa Rodrigues
  0 siblings, 0 replies; 8+ messages in thread
From: Pedro Nuno Costa Rodrigues @ 2012-05-12 15:08 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking


Citando Marek Lindner <lindner_marek@yahoo.de>:

> On Friday, May 11, 2012 05:48:54 Pedro Nuno Costa Rodrigues wrote:
>> I'm using backfire (openwrt build):
>> cat /home/pedro/backfire/feeds/packages/net/batman-adv/Makefile | grep
>> 2012# Copyright (C) 2010-2012
>> OpenWrt.orgPKG_VERSION:=2012.0.0BATCTL_VERSION:=2012.0.0
>
> You are trying to mix 2 different branches: backfire + trunk batman-adv
>  * the batman-adv package coming with backfire is working fine with backfire
>  * the batman-adv package from trunk works fine with trunk
>
> Mixing the package with another branch is officially unsupported  
> because there
> are some OpenWrt incompatibilities we can't not automatically handle. It
> certainly is doable but requires deeper knowledge of OpenWrt.
>
> Cheers,
> Marek




hello!

I didn't tryed to mix 2 different branches...
Perhaps i wasn't very clear.

I build the backfire branch and i tested the batman-adv and it worked fine...
I also build (another build completely independent) of the trunk  
bruch, but it didn't worked...

I used the same configurations files on both... exactly the same, but  
the trunk build gave the error:


root at OpenWrt:/lib/batman-adv# batman-adv start
/usr/sbin/batman-adv: eval: line 1: can't
create/sys/class/net/bat0/mesh/orig_interval: nonexistent directory

/usr/sbin/batman-adv: eval: line 1: can't create
/sys/class/net/bat0/mesh/log_level: nonexistent directory

/usr/sbin/batman-adv: eval: line 1: can't create
/sys/class/net/bat0/mesh/bonding: nonexistent
directory/usr/sbin/batman-adv: eval: line 1: can't create
/sys/class/net/bat0/mesh/fragmentation: nonexistent directory

/usr/sbin/batman-adv: eval: line 1: can't create
/sys/class/net/bat0/mesh/gw_bandwidth: nonexistent directory

/usr/sbin/batman-adv: eval: line 1: can't create
/sys/class/net/bat0/mesh/gw_mode: nonexistent
directory/usr/sbin/batman-adv: eval: line 1: can't create
/sys/class/net/bat0/mesh/vis_mode: nonexistent directory

/usr/sbin/batman-adv: eval: line 1: can't create
/sys/class/net/bat0/mesh/ap_isolation: nonexistent directory


and i checked if it was the crc-16 problem livrary, but it wasn't.

I know that's an openwrt problem. Or something that missed me...

I will try to analyze and if it is necessary i will try to contact  
openwrt developers...

Thank you!!
best regards
Pedro Rodrigues


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

end of thread, other threads:[~2012-05-12 15:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20120501190319.Horde.oIfHDR3HAoJPoCVnYaUF_lA@beta.mail.sapo.pt>
     [not found] ` <43098025.shuUEIUiJR@sven-desktop.home.narfation.org>
2012-05-10 21:48   ` [B.A.T.M.A.N.] Batman-adv simple configuration example Pedro Nuno Costa Rodrigues
2012-05-10 21:55     ` Sven Eckelmann
2012-05-10 21:57     ` Pedro Nuno Costa Rodrigues
2012-05-11  6:59     ` Marek Lindner
2012-05-12 15:08       ` Pedro Nuno Costa Rodrigues
2012-05-01 19:06 Pedro Nuno Costa Rodrigues
2012-05-01 19:34 ` Sven Eckelmann
2012-05-07 18:17   ` Guido Iribarren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox