All of lore.kernel.org
 help / color / mirror / Atom feed
* How to run batman-adv on interfaces in AP / Station mode?
@ 2019-07-11  3:44 Ricardo Cerrato
  2019-07-11  6:48 ` Sven Eckelmann
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Cerrato @ 2019-07-11  3:44 UTC (permalink / raw)
  To: b.a.t.m.a.n

Hello all!

I recently configured a mesh with two nodes running Debian and
batman-adv and two wireless adapters TP-LINK TL-WN422G configured in
IBSS mode, and to allow non-mesh clients (like my cellphone) to use
the mesh I had to use another wireless adapter (same TL-WN422G)
configured in AP mode and bridged to the mesh interface (bat0).
Recently I found in the FAQ:

"Can batman-adv run on interfaces in AP / Station / etc mode ?
Q: Can BATMAN advanced run on interfaces in AP / Station mode?
A: Yes, because batman-adv doesn't know anything about stuff below the
ethernet interface. So you could also use it over layer 2 ethernet
tunnels, wifi ap, wifi sta, wifi adhoc, ethernet or even write a
virtual interface which prints everything on paper and scans the paper
on the remote machine (but you should be fast or increase the ogm
interval)."

I guess it is possible use the same adapter as AP and mesh client..
I my tests I found the AP mode and IBSS modes are mutually exclusive,
but I didn't find examples on how to create a mesh without IBSS...

Could you provide and example of configuration or some information
about how to do this?

I would like to create a mesh and allow non-mesh clients (like any
mobile) to connect and use a messenger service that will run over that
mesh and it would be great if every node of the mesh (using one
TL-WN422G adapter) can be also an AP for any client.

The adapters have the following supported modes and combinations:

Supported interface modes:
 * IBSS
 * managed
 * AP
 * AP/VLAN
 * monitor
 * mesh point
 * P2P-client
 * P2P-GO
 * outside context of a BSS

valid interface combinations:
 * #{ managed, P2P-client } <= 2, #{ AP, mesh point, P2P-GO } <= 2,
   total <= 2, #channels <= 1

I'm using Debian Stretch on the nodes

Thanks in advance!

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

* Re: How to run batman-adv on interfaces in AP / Station mode?
  2019-07-11  3:44 How to run batman-adv on interfaces in AP / Station mode? Ricardo Cerrato
@ 2019-07-11  6:48 ` Sven Eckelmann
  2019-07-12  3:38   ` Ricardo Cerrato
  0 siblings, 1 reply; 3+ messages in thread
From: Sven Eckelmann @ 2019-07-11  6:48 UTC (permalink / raw)
  To: b.a.t.m.a.n

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

On Thursday, 11 July 2019 05:44:07 CEST Ricardo Cerrato wrote:
> I recently configured a mesh with two nodes running Debian and
> batman-adv and two wireless adapters TP-LINK TL-WN422G configured in
> IBSS mode, and to allow non-mesh clients (like my cellphone) to use
> the mesh I had to use another wireless adapter (same TL-WN422G)
> configured in AP mode and bridged to the mesh interface (bat0).
> Recently I found in the FAQ:
> 
> "Can batman-adv run on interfaces in AP / Station / etc mode ?
> Q: Can BATMAN advanced run on interfaces in AP / Station mode?
> A: Yes, because batman-adv doesn't know anything about stuff below the
> ethernet interface. So you could also use it over layer 2 ethernet
> tunnels, wifi ap, wifi sta, wifi adhoc, ethernet or even write a
> virtual interface which prints everything on paper and scans the paper
> on the remote machine (but you should be fast or increase the ogm
> interval)."
> 
> I guess it is possible use the same adapter as AP and mesh client..

Yes, but this is a question for the linux-wireless folks. And the FAQ entry 
doesn't talk about this at all. You want to run AP and IBSS (which most likely 
doesn't work with your adapter; search for vif and interface combinations) in 
parallel and the FAQ entry talks about running batman-adv on top of something 
which is not IBSS.

> I my tests I found the AP mode and IBSS modes are mutually exclusive,
> but I didn't find examples on how to create a mesh without IBSS...

There are plenty of examples out there which for example use 11s/meshpoint 
(with mesh_fwding set to 0) as an actual useful way to run batman-adv without 
IBSS. Just create the AP as normal and then create the the secondary vif for 
the mesh. It seems like most adapters today support meshpoint better than IBSS 
and thus you can just try to switch your underlying mode from IBSS to 
meshpoint. I also posted the commands to create a meshpoint interface on this 
mailing list a while back [1].

You can then just add the meshpoint interface to batman-adv and use it like 
IBSS (just with the difference that it is NOT IBSS).

But this doesn't seem to be batman-adv related question but questions for the 
linux-wireless community.

[...]
> valid interface combinations:
>  * #{ managed, P2P-client } <= 2, #{ AP, mesh point, P2P-GO } <= 2,
>    total <= 2, #channels <= 1

Here you can see that you can for example run an AP interface and mesh_point 
(just make sure that you disabled mesh_fwding) at the same time. batman-adv 
would run on top of the meshpoint interface.

Btw. you will most likely observer some odd behavior when you try to scale the 
mesh - these are most likely caused by the limitations [2] of the usb wifi 
stick.

Kind regards,
	Sven

[1] https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/2015-December/013924.html
[2] https://wireless.wiki.kernel.org/en/users/drivers/ath9k_htc

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

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

* Re: How to run batman-adv on interfaces in AP / Station mode?
  2019-07-11  6:48 ` Sven Eckelmann
@ 2019-07-12  3:38   ` Ricardo Cerrato
  0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Cerrato @ 2019-07-12  3:38 UTC (permalink / raw)
  To: Sven Eckelmann; +Cc: b.a.t.m.a.n

Hi Sven,

You're right! I was looking on the wrong place.
Following your advice I was able to use create the meshpoint and AP
with the same usb wifi stick and batman-adv is working as expected.
I promise the next time I'll only ask questions related to batman.

Thank you!


On Thu, Jul 11, 2019 at 1:48 AM Sven Eckelmann <sven@narfation.org> wrote:
>
> On Thursday, 11 July 2019 05:44:07 CEST Ricardo Cerrato wrote:
> > I recently configured a mesh with two nodes running Debian and
> > batman-adv and two wireless adapters TP-LINK TL-WN422G configured in
> > IBSS mode, and to allow non-mesh clients (like my cellphone) to use
> > the mesh I had to use another wireless adapter (same TL-WN422G)
> > configured in AP mode and bridged to the mesh interface (bat0).
> > Recently I found in the FAQ:
> >
> > "Can batman-adv run on interfaces in AP / Station / etc mode ?
> > Q: Can BATMAN advanced run on interfaces in AP / Station mode?
> > A: Yes, because batman-adv doesn't know anything about stuff below the
> > ethernet interface. So you could also use it over layer 2 ethernet
> > tunnels, wifi ap, wifi sta, wifi adhoc, ethernet or even write a
> > virtual interface which prints everything on paper and scans the paper
> > on the remote machine (but you should be fast or increase the ogm
> > interval)."
> >
> > I guess it is possible use the same adapter as AP and mesh client..
>
> Yes, but this is a question for the linux-wireless folks. And the FAQ entry
> doesn't talk about this at all. You want to run AP and IBSS (which most likely
> doesn't work with your adapter; search for vif and interface combinations) in
> parallel and the FAQ entry talks about running batman-adv on top of something
> which is not IBSS.
>
> > I my tests I found the AP mode and IBSS modes are mutually exclusive,
> > but I didn't find examples on how to create a mesh without IBSS...
>
> There are plenty of examples out there which for example use 11s/meshpoint
> (with mesh_fwding set to 0) as an actual useful way to run batman-adv without
> IBSS. Just create the AP as normal and then create the the secondary vif for
> the mesh. It seems like most adapters today support meshpoint better than IBSS
> and thus you can just try to switch your underlying mode from IBSS to
> meshpoint. I also posted the commands to create a meshpoint interface on this
> mailing list a while back [1].
>
> You can then just add the meshpoint interface to batman-adv and use it like
> IBSS (just with the difference that it is NOT IBSS).
>
> But this doesn't seem to be batman-adv related question but questions for the
> linux-wireless community.
>
> [...]
> > valid interface combinations:
> >  * #{ managed, P2P-client } <= 2, #{ AP, mesh point, P2P-GO } <= 2,
> >    total <= 2, #channels <= 1
>
> Here you can see that you can for example run an AP interface and mesh_point
> (just make sure that you disabled mesh_fwding) at the same time. batman-adv
> would run on top of the meshpoint interface.
>
> Btw. you will most likely observer some odd behavior when you try to scale the
> mesh - these are most likely caused by the limitations [2] of the usb wifi
> stick.
>
> Kind regards,
>         Sven
>
> [1] https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/2015-December/013924.html
> [2] https://wireless.wiki.kernel.org/en/users/drivers/ath9k_htc

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

end of thread, other threads:[~2019-07-12  3:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-11  3:44 How to run batman-adv on interfaces in AP / Station mode? Ricardo Cerrato
2019-07-11  6:48 ` Sven Eckelmann
2019-07-12  3:38   ` Ricardo Cerrato

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