All of lore.kernel.org
 help / color / mirror / Atom feed
* How to run separate iwd for every wifi dongle on the same host?
@ 2022-04-21  1:40 zlinuxboy
  0 siblings, 0 replies; 5+ messages in thread
From: zlinuxboy @ 2022-04-21  1:40 UTC (permalink / raw)
  To: iwd

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

I am trying to plug 3 wifi dongle into one SBC(odroid c2 running armbian 22.01), wish to run separate iwd instance for each wifi dongle, in order to connect different ssid and acquire dhcp ip address and assign to them.

I have successfully implement with systemd-networkd+vrf+iwd, assign three wifi dongle to different vrf. start iwd, all three wifi dongle could connect to the same ssid and get different ip with dhcp, including default route.

but when I assign different wifi dongle to the same ssid  with different psk(my ap is aerohive, support ppsk, everything user have a different private key. cisco, ruckus, aruba has such the same feature), iwd could not save the multiple config for the same ssid, because the same ssid share one config. so any possible to run separate iwd for every wifi dongle?

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

* Re: How to run separate iwd for every wifi dongle on the same host?
@ 2022-04-21 19:29 Denis Kenzior
  0 siblings, 0 replies; 5+ messages in thread
From: Denis Kenzior @ 2022-04-21 19:29 UTC (permalink / raw)
  To: iwd

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

Hi,

On 4/21/22 07:54, zlinuxboy(a)outlook.com wrote:
> could you elaborate more details about how to create private dbus and start iwd instance to attach these dbus?

You can take a look at the ell dbus unit test, to get the general idea:

https://git.kernel.org/pub/scm/libs/ell/ell.git/tree/unit/test-dbus.c

Also look at iwd's test-runner, it does something similar as well.

https://git.kernel.org/pub/scm/network/wireless/iwd.git/tree/tools/utils.py#n266

Basically you need to:

1. Start a private dbus-daemon instance at a private address.
2. Point iwd to this dbus-daemon instance by setting the DBUS_SYSTEM_BUS_ADDRESS 
environment variable prior to starting iwd.
3. Override iwd's STATE_DIRECTORY or CONFIGURATION_DIRECTORY as needed by 
setting the appropriate environment variables (see 'man 8 iwd').
4. Each iwd instance would only be accessible via the private dbus daemon 
instance.  So 'iwctl' or your own dbus client would need to use the private dbus 
address(es) from step 1.

Probably something else I'm not thinking of?  Hope this helps.

Regards,
-Denis

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

* Re: How to run separate iwd for every wifi dongle on the same host?
@ 2022-04-21 16:00 Marcel Holtmann
  0 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2022-04-21 16:00 UTC (permalink / raw)
  To: iwd

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

Hi Denis,

>> I am trying to plug 3 wifi dongle into one SBC(odroid c2 running armbian 22.01), wish to run separate iwd instance for each wifi dongle, in order to connect different ssid and acquire dhcp ip address and assign to them.
>> I have successfully implement with systemd-networkd+vrf+iwd, assign three wifi dongle to different vrf. start iwd, all three wifi dongle could connect to the same ssid and get different ip with dhcp, including default route.
> 
> vrf?
> 
>> but when I assign different wifi dongle to the same ssid  with different psk(my ap is aerohive, support ppsk, everything user have a different private key. cisco, ruckus, aruba has such the same feature), iwd could not save the multiple config for the same ssid, because the same ssid share one config. so any possible to run separate iwd for every wifi dongle?
> 
> I don't think you'd be able to accomplish this easily with iwd as of today.  You can try running a private system bus (dbus) for each iwd instance and using phy filtering (see 'iwd --help') so that each iwd instance only manages the particular phy you want.  Or use namespaces.  But you'd need to access each iwd instance via its private bus/namespace separately.  You'd also need to override the state directory for each iwd instance.

you can use the environment variables STATE_DIRECTORY and CONFIGURATION_DIRECTORY to point to separate directories for storage and config.

Regards

Marcel

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

* Re: How to run separate iwd for every wifi dongle on the same host?
@ 2022-04-21 12:54 zlinuxboy
  0 siblings, 0 replies; 5+ messages in thread
From: zlinuxboy @ 2022-04-21 12:54 UTC (permalink / raw)
  To: iwd

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

could you elaborate more details about how to create private dbus and start iwd instance to attach these dbus?
I am totally new on these field.Thanks in advanced.

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

* Re: How to run separate iwd for every wifi dongle on the same host?
@ 2022-04-21  1:57 Denis Kenzior
  0 siblings, 0 replies; 5+ messages in thread
From: Denis Kenzior @ 2022-04-21  1:57 UTC (permalink / raw)
  To: iwd

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

Hi,

On 4/20/22 20:40, zlinuxboy(a)outlook.com wrote:
> I am trying to plug 3 wifi dongle into one SBC(odroid c2 running armbian 22.01), wish to run separate iwd instance for each wifi dongle, in order to connect different ssid and acquire dhcp ip address and assign to them.
> 
> I have successfully implement with systemd-networkd+vrf+iwd, assign three wifi dongle to different vrf. start iwd, all three wifi dongle could connect to the same ssid and get different ip with dhcp, including default route.

vrf?

> 
> but when I assign different wifi dongle to the same ssid  with different psk(my ap is aerohive, support ppsk, everything user have a different private key. cisco, ruckus, aruba has such the same feature), iwd could not save the multiple config for the same ssid, because the same ssid share one config. so any possible to run separate iwd for every wifi dongle?

I don't think you'd be able to accomplish this easily with iwd as of today.  You 
can try running a private system bus (dbus) for each iwd instance and using phy 
filtering (see 'iwd --help') so that each iwd instance only manages the 
particular phy you want.  Or use namespaces.  But you'd need to access each iwd 
instance via its private bus/namespace separately.  You'd also need to override 
the state directory for each iwd instance.

Also, iwd isn't aware of SAE password identities (I assume this is what you mean 
by PPSK).  Or is this something else?

Anyhow, you'd probably need to add some intelligence into iwd for it to use 
multiple PSKs on the same SSID properly within the same iwd instance.

Regards,
-Denis

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

end of thread, other threads:[~2022-04-21 19:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21  1:40 How to run separate iwd for every wifi dongle on the same host? zlinuxboy
2022-04-21  1:57 Denis Kenzior
2022-04-21 12:54 zlinuxboy
2022-04-21 16:00 Marcel Holtmann
2022-04-21 19:29 Denis Kenzior

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.