intrig-unicamp / mininet-wifi

Emulator for Software-Defined Wireless Networks
https://mn-wifi.readthedocs.io/
Other
438 stars 239 forks source link

bridging wireless interfaces with OVS #307

Closed asljivo1 closed 4 years ago

asljivo1 commented 4 years ago

Hello,

I want to bridge wireless interface "sta1-wlan0" on a mininet node to a tap interface. I can do this on real hardware using ovs bridge ovs-vsctl add-br br1 ovs-vsctl add-port br1 tap1 ovs-vsctl add-port br1 sta1-wlan0

In mininet node, I can use linux bridge to bridge eth interfaces to tap with no issues. However, I cannot bridge wifi interface (neither with linux bridge nor with ovs bridge), I always get "Could not open network device sta1-wlan0 (No such device)" from ovs bridge (which sees only interfaces on my host machine) and "can't add sta1-wlan0 to bridge br1: Operation not supported" from linux bridge that normally sees interfaces in a mininet host (I can add tap interfaces to linux bridge).

Is it possible to bridge a wireless interface of a mininet host? If yes, how?

Thanks in advance!

ramonfontes commented 4 years ago

Hi,

You may need to run the station in the root NS: net.addStation(... inNamespace=False)

asljivo1 commented 4 years ago

Hi,

Thank you for the quick response again.

I can run the station in the root namespace and add wireless interfaces of the station to the newly created OVS bridge. However, the station in the root namespace cannot be associated to the AP (that is also in the root namespace by default). They behave like the same device with the same interfaces. Could multiple stations in the (same) root namespace run the same application multiple times? Running the station in the root namespace then disables me to have multiple stations (I need OVS bridge on every station in the wireless network, and I need them running same applications)?

It seems like running the station in the root namespace does enable me to add wlan interfaces to my OVS bridge, but then dissables "normal" wireless network operation? I want to bridge a wireless interface in mininet wireless station like I would bridge it in a linux host, and then be able to communicate to the outside network. Is this possible?

ramonfontes commented 4 years ago

I can run the station in the root namespace and add wireless interfaces of the station to the newly created OVS bridge. However, the station in the root namespace cannot be associated to the AP (that is also in the root namespace by default). They behave like the same device with the same interfaces.

This might be caused by the confusion on the data link layer.

Could multiple stations in the (same) root namespace run the same application multiple times?

I don't think so.

My suggestion for you would be to use the AP in managed mode - see https://mininet-wifi.github.io/part3/#mode. Thus, you could have a switch attached to the wlan interface. However, you cannot use OVS because OVS only run in the root NS. You can use ofsoftswitch13 (UserAP - sudo util/install.sh -3f) or even P4AP.