b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.]  batman-adv: Force line topology
@ 2015-06-12 12:31 Carlos Meralto
  2015-06-13 13:58 ` Sven Eckelmann
  0 siblings, 1 reply; 5+ messages in thread
From: Carlos Meralto @ 2015-06-12 12:31 UTC (permalink / raw)
  To: b.a.t.m.a.n

Hello, I am developing my thesis on mesh networks. And I'm currently
doing some tests with batman-adv.
So my question is:
I need to create a line topology. For example:
A-> B-> C-> D

Of all the options I tried, I could not find a solution to do this
https://lists.open-mesh.org/pipermail/batman/2012-September/008019.html
https://lists.open-mesh.org/pipermail/batman/2011-July/005169.html

I can not use the ebtables because I am using the wlan0 interface. And
when I try to create a bridge on the interface (wlan0) gives me an
error.

root@OpenWrt:~# batctl if del adhoc0
root@OpenWrt:~# brctl addbr bridgeWlan
root@OpenWrt:~# brctl addif bridgeWlan adhoc0
brctl: bridge bridgeWlan: Operation not supported

There is already a way to force a topology in batman-adv?

I'm blocked with no solution.

Thanks in advance.

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

* Re: [B.A.T.M.A.N.] batman-adv: Force line topology
  2015-06-12 12:31 [B.A.T.M.A.N.] batman-adv: Force line topology Carlos Meralto
@ 2015-06-13 13:58 ` Sven Eckelmann
  2015-06-13 18:15   ` Carlos Meralto
       [not found]   ` <165699CE-BD67-45D4-AAC1-64663C9B466B@gmail.com>
  0 siblings, 2 replies; 5+ messages in thread
From: Sven Eckelmann @ 2015-06-13 13:58 UTC (permalink / raw)
  To: b.a.t.m.a.n

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

On Friday 12 June 2015 13:31:54 Carlos Meralto wrote:
> Hello, I am developing my thesis on mesh networks. And I'm currently
> doing some tests with batman-adv.
> So my question is:
> I need to create a line topology. For example:
> A-> B-> C-> D
> 
> Of all the options I tried, I could not find a solution to do this
> https://lists.open-mesh.org/pipermail/batman/2012-September/008019.html
> https://lists.open-mesh.org/pipermail/batman/2011-July/005169.html
> 
> I can not use the ebtables because I am using the wlan0 interface. And
> when I try to create a bridge on the interface (wlan0) gives me an
> error.
> 
> root@OpenWrt:~# batctl if del adhoc0
> root@OpenWrt:~# brctl addbr bridgeWlan
> root@OpenWrt:~# brctl addif bridgeWlan adhoc0
> brctl: bridge bridgeWlan: Operation not supported

You can patch the driver to allow this (it is just a simple check which
disallows it in most drivers... or actually in wireless core [1]). But you
should make sure that you still use the same mac addresses for vif + bridge
and don't end up with 4 address packets.

> There is already a way to force a topology in batman-adv?

No. There were only different solutions (not acceptable for the linux kernel)
which did this directly in batman-adv. A very prominent (and easy to find)
solution was from Martin [2]

The idea behind batman-adv is that it finds paths and thus automatically
creates a good virtual topologies.

> I'm blocked with no solution.
> 
> Thanks in advance.

I don't know why you want to use wlan and you also don't explain it in your
mail. You could for example also use emulation + vde2 [3] since you already
try to emulate a setup which is not there in reality.

Kind regards,
	Sven

[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/net/wireless/core.c#n1021
[2] http://git.open-mesh.org/batman-adv.git/commit/b6b01487d43ca82a53e61b3651506082a280f422
[3] http://www.open-mesh.org/projects/open-mesh/wiki/Emulation

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

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

* Re: [B.A.T.M.A.N.] batman-adv: Force line topology
  2015-06-13 13:58 ` Sven Eckelmann
@ 2015-06-13 18:15   ` Carlos Meralto
  2015-06-14 14:30     ` Gui Iribarren
       [not found]   ` <165699CE-BD67-45D4-AAC1-64663C9B466B@gmail.com>
  1 sibling, 1 reply; 5+ messages in thread
From: Carlos Meralto @ 2015-06-13 18:15 UTC (permalink / raw)
  To: Sven Eckelmann; +Cc: b.a.t.m.a.n

Thanks for the answer Sven.

You can patch the driver to allow this (it is just a simple check which
disallows it in most drivers... or actually in wireless core [1]). But you
should make sure that you still use the same mac addresses for vif + bridge
and don't end up with 4 address packets.


Can you explain how I can apply this "patch”? I saw the file attached
but i don't know what parameters must change.

There is already a way to force a topology in batman-adv?


No. There were only different solutions (not acceptable for the linux kernel)
which did this directly in batman-adv. A very prominent (and easy to find)
solution was from Martin [2]

The idea behind batman-adv is that it finds paths and thus automatically
creates a good virtual topologies.


If you can not use ebtables I will try to use the patch that Martin did.

I'm blocked with no solution.

Thanks in advance.


I don't know why you want to use wlan and you also don't explain it in your
mail. You could for example also use emulation + vde2 [3] since you already
try to emulate a setup which is not there in reality.


The first task of my thesis is to make a comparison between
open802.11s and batman-adv for node discovery time and througput, in
function of hops and recovery in case of failure. So i want make this
tests in a real scenario...

Thanks in advance.

Best Regards,
Carlos Meralto

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

* Re: [B.A.T.M.A.N.] batman-adv: Force line topology
       [not found]   ` <165699CE-BD67-45D4-AAC1-64663C9B466B@gmail.com>
@ 2015-06-13 19:30     ` Sven Eckelmann
  0 siblings, 0 replies; 5+ messages in thread
From: Sven Eckelmann @ 2015-06-13 19:30 UTC (permalink / raw)
  To: Carlos Meralto; +Cc: b.a.t.m.a.n

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

On Saturday 13 June 2015 19:17:57 Carlos Meralto wrote:
> Thanks for the answer Sven.
> 
> > You can patch the driver to allow this (it is just a simple check which
> > disallows it in most drivers... or actually in wireless core [1]). But you
> > should make sure that you still use the same mac addresses for vif +
> > bridge
> > and don't end up with 4 address packets.
> 
> Can you explain how I can apply this "patch”? I saw the file attached but i
> don't know what parameters must change.

You have to modify this file or similar ones yourself to avoid that it sets 
IFF_DONT_BRIDGE. And then you have to recompile your kernel with your patch 
and run it - but you should be aware that this is only a hack. It was already 
discussed on this mailing list how the wifi stack avoids that the bridge 
accepts specific types of interfaces [1].

You should also find in this thread a patch [2] which shows how some ebtables 
functionality could in theory also be added to something like batman-adv. You 
should be aware that this is not in the upstream version because it is 
considered not acceptable by the Linux networking subsystem maintainer.

You should also be aware that it is problematic to test to different protocols 
by using two different, protocol/implementation specific ways to force them to 
a specific topologies.

Kind regards,
	Sven

[1] https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/2010-May/002718.html
[2] https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/2010-May/002731.html

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

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

* Re: [B.A.T.M.A.N.] batman-adv: Force line topology
  2015-06-13 18:15   ` Carlos Meralto
@ 2015-06-14 14:30     ` Gui Iribarren
  0 siblings, 0 replies; 5+ messages in thread
From: Gui Iribarren @ 2015-06-14 14:30 UTC (permalink / raw)
  To: b.a.t.m.a.n

On 13/06/15 15:15, Carlos Meralto wrote:
> Thanks for the answer Sven.
> 
> You can patch the driver to allow this (it is just a simple check which
> disallows it in most drivers... or actually in wireless core [1]). But you
> should make sure that you still use the same mac addresses for vif + bridge
> and don't end up with 4 address packets.
> 
> 
> Can you explain how I can apply this "patch”? I saw the file attached
> but i don't know what parameters must change.
> 
> There is already a way to force a topology in batman-adv?
> 
> 
> No. There were only different solutions (not acceptable for the linux kernel)
> which did this directly in batman-adv. A very prominent (and easy to find)
> solution was from Martin [2]
> 
> The idea behind batman-adv is that it finds paths and thus automatically
> creates a good virtual topologies.
> 
> 
> If you can not use ebtables I will try to use the patch that Martin did.
> 
> I'm blocked with no solution.
> 
> Thanks in advance.
> 
> 
> I don't know why you want to use wlan and you also don't explain it in your
> mail. You could for example also use emulation + vde2 [3] since you already
> try to emulate a setup which is not there in reality.
> 
> 
> The first task of my thesis is to make a comparison between
> open802.11s and batman-adv for node discovery time and througput, in
> function of hops and recovery in case of failure. So i want make this
> tests in a real scenario...

then make it a real scenario :)

the simulated line topology will not behave the same as a real-world
line topology in terms of throughput, due to interferences that will
happen in your simulated scenario, that wouldn't happen in real life

if you still want to try it, an alternative (to patching batman-adv) is
to use VLANs on top of the adhoc interfaces
so instead of adding plain adhoc0 with "batctl if"
first create some vlans over adhoc0
say, on first node, create and add adhoc0.1 to batman
then on second node, create adhoc0.1 and adhoc0.2 then add both
interfaces to batman,
on third node, adhoc0.2 and adhoc0.3... and so on
this way, the third node will have no links with the first node.
it won't help with the interference problem i mentioned above, tho.

good luck!

> 
> Thanks in advance.
> 
> Best Regards,
> Carlos Meralto
> 

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

end of thread, other threads:[~2015-06-14 14:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-12 12:31 [B.A.T.M.A.N.] batman-adv: Force line topology Carlos Meralto
2015-06-13 13:58 ` Sven Eckelmann
2015-06-13 18:15   ` Carlos Meralto
2015-06-14 14:30     ` Gui Iribarren
     [not found]   ` <165699CE-BD67-45D4-AAC1-64663C9B466B@gmail.com>
2015-06-13 19:30     ` Sven Eckelmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).