Limitations
It is possible to use MPTCP, but WSL2 uses a virtual interface that prevents advertising multiple paths. There might be a solution using multiple forwarded ports but I haven’t been able to use it yet.
Prerequisite
Install Ubuntu in WSL2 (simply look for Ubuntu in the Microsoft Store)
Optional: Allow Windows to keep both Wifi and Ethernet open
Windows will automatically turn off wifi when Ethernet is plugged in. If you want to try MPTCP over Wifi + Ethernet (or 4G through USB, all the same) you must disable this behavior :
1. Open Registry Editor.
2. Go to HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WcmSvc\Local.
3. Create/change the fMinimizeConnections registry DWORD to 0.
4. Close Registry Editor and reboot.
Step 1 : Install an MPTCP-compatible Kernel (easier than it sounds!)
sudo apt install build-essential flex bison libssl-dev libelf-dev pahole
git clone https://github.com/microsoft/WSL2-Linux-Kernel.git
cd WSL2-Linux-Kernel
cp Microsoft/config-wsl .config
Edit .config and change “#CONFIG_MPTCP is not set” by CONFIG_MPTCP=y
make -j4
cp arch/x86/boot/vmlinux.bin /mnt/c/vmlinux
Then shut down WSL in a CMD window:
wsl --shutdown
And to boot in your new kernel add a file in C:\Users\$USER\.wslconfig
[wsl2]
kernel=C:\vmlinux
Step 2 : Install mptcpd
This is to get the “mptcpize” command to run a legacy TCP application with mptcp
sudo apt install mptcpd
Step 3 : Try it out !
sudo apt install iperf
sudo tcpdump -i lo -w capture.pcap
mptcpize run iperf -s
mptcpize run iperf -c 127.0.0.1 -b 1k -l 1
Then open capture.pcap with wireshark and you should see MPTCP instead of TCP 🙂
Step 3 : SSH and failover
[todo!]