Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Bridged Ethernet and as a Kernel loadable module #6902

Open
hakiri opened this issue May 3, 2021 · 2 comments
Open

Support Bridged Ethernet and as a Kernel loadable module #6902

hakiri opened this issue May 3, 2021 · 2 comments
Labels
feature kconfig linux kernel configuration

Comments

@hakiri
Copy link

hakiri commented May 3, 2021

Is your feature request related to a problem? Please describe.
Currently, running Mininet simulator (http://mininet.org/) for setting up an SDN development environment on WSL 2 becomes impossible.

The requested feature is ta make it possible to enable such an environment in WSL 2, which in turn allows running advanced software switching technology like OpenVSwitch (https://www.openvswitch.org/).
This will open up further possibilities to run virtualized technologies such OpenMANO (https://github.com/nfvlabs/openmano) as well as many network orchestration and management tools such as OSM (https://osm.etsi.org/).
Specifically, advanced virtualization technologies such SDN/NFV are currently used in the 5G network and beyond.
Supporting these features, will open up several opportunities to the research community to enable testing and simulating 5G anf beyond in WSL2 (which is considered near to bare-metal virtualization in terms of performance and scalability).
It will open up several opportunities for teachers, students, researchers and labs centers ta make it possible to simulate such big challenges inside their laptops or surface.

Describe the solution you'd like
To make it possible to enable Mininet and Openvswitch on WSL 2, the main solution to address these limitations is to compile with a loadable kernel module instead of a built-in module.

Describe alternatives you've considered
To make this happen, the current workaround to bypass this problem is to build a new WSL2 kernel with customized features as described in WSL2 + Mininet (https://zhuanlan.zhihu.com/p/138933513):

  1. The main thing is to modify Networking Support -> Networking Options -> 802.1d Ethernet Bridging to modularize features, that is, to compile with a loadable kernel module instead of a built-in module.
  2. After booting, first install the kernel module (sudo make modules_install), then load the bridge module (sudo modprobe bridge && sudo lsmod).
  3. Thereafter, install openvswitch normally using command : sudo apt install openvswitch-switch. Then, The current WSL 2 does not have systemd yet, so you have to use init.d (or you may use one of the workarround to support systemd in WSL2 like described here : https://github.com/arkane-systems/genie or here : https://github.com/hakiri/ubuntu-wsl2-systemd-script.
  4. Next, you can install Mininet under Ubuntu by typing: sudo apt install mininet, and test it is working by typing:
    sudo mn --test pingall
  5. If you want to use Mininet-WIFI (https://mininet-wifi.github.io/), which is mininet for wireless communication and IoT (including 6LowPAN), you have to modify the options to support mac80211 and mac80211_hwsim when compiling the kernel (in step 1 above), by doing a) mac80211 in Networking Support -> Wireless -> cfg80211 and mac80211; and b) mac80211_hwsim is in Device Drivers -> Network device support -> Wireless Lan -> Simulated radio testing tool for mac80211.

These steps have been tested successfully for WSL 4.19; but have several running issues when compiling WSL2-Linux-Kernel 5.4 and 5.10.
Additional context
Below are the workaround to make this feature possible:

image

@hakiri hakiri added the feature label May 3, 2021
@therealkenc
Copy link
Collaborator

that is, to compile with a loadable kernel module instead of a built-in module.that is, to compile with a loadable kernel module instead of a built-in module.

CONFIG_BRIDGE (plus CONFIG_BRIDGE_NETFILTER= and CONFIG_BRIDGE_VLAN_FILTERING) are compiled =y by design.

From your screencaps, it looks like the asks are:

CONFIG_MAC80211
CONFIG_MAC80211_HWSIM
CONFIG_MAC80211_MESH
CONFIG_CFG80211
CONFIG_OPENVSWITCH

If I missed any (I might have) please list the kconfig options you'd like.

@therealkenc therealkenc added the kconfig linux kernel configuration label May 4, 2021
@hakiri
Copy link
Author

hakiri commented May 4, 2021

@therealkenc Correct, the config files I used are changed from =y to =M.
My post is not an issue, but a suggestion to support such features in the future.

the post is to suggest supporting CONFIG_BRIDGE=M and in general to provide (why not make it possible in future releases) support for advanced switching capabilities like openvswitch.
Currently, multipass (an alternative to WSL2 from ubuntu canonical) is a type hypervisor that can run atop of VirtualBox and hyper-v supports such features (but still type 2 hypervisor)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature kconfig linux kernel configuration
Projects
None yet
Development

No branches or pull requests

2 participants