[Tutorial] Build OpenWrt with Multipath TCP

Apologies. You should be able to properly download the files on the link below. I also updated the links on the main post to address the issue.

Thanx. Now it works fine.
@arinc9, what type of tcp congestion control do you use in your instances? Did you try the different ones?

i managed to do aggregate my links with v2ray. i have one question: is wireguard really necessary to aggregate UDP traffic? from some tests i've made with some online tools it seems like UDP is getting the full aggregated speed even right now to me, i might be wrong though.

WireGuard doesn't aggregate UDP, the only reason to use it is to encrypt UDP traffic (and get better route paths through the WireGuard server).

I'm not sure what you mean by "some online tools" but MPTCP does not aggregate UDP.

Iā€™ve got very stable 5x 100mbps links so I didnā€™t need to try anything other than cubic.

By the way, adding my handle on an edit wonā€™t notify me.

i see
does that mean that at the moment my UDP traffic isn't going through the VPS? could this cause any issues?

Not only UDP, anything non-TCP goes through the default route on your router. It shouldnā€™t cause you trouble.

All links have the same (or similar) RTT?
Just now have tried mptcp on my Banana-BPI R64 (with copper eth and LTE modem). Looks like a magic.

Yeah, connection to my VPS is ~14ms on all links.

Well I tried. I launched

git clone https://github.com/multipath-tcp/mptcp.git
cd mptcp
git checkout 07c4c2e2bcd38896762f29e74abb57bdd3a2a4d1 #last commit mounting v5.4.101
git remote add stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
git fetch stable --tags
git diff v$(make kernelversion)..HEAD > mptcp_v0.96.patch #$(make kernelversion) is v5.4.101

But the result doesn't seem right. It's only 300kb (as opposed to several mbs of your patch) and if I CTRL+F into it I can find no mention of "mptcp".

I'm trying to compile for the BPi R64 too. Can you share how did you manage to make it?

First of all, you are checking out the wrong commit.

To explain what is there on your current diff file:
Even though, on the makefile, the kernel version is 5.4.101, the current commit you checked out includes the changes for 5.4.102 (and nothing else, which is explained below).
Always use a tagged commit, or better, just use the tag (e.g. v5.4.101).

Secondly, you are checking out a commit which is merged into the mptcp branch. So technically, you're just checking out the Linux branch that folks from mptcp chose to merge the mptcp_v0.96 branch with, so there's no mptcp stuff on it.

What you need to checkout is a merge point. How to find one? There's a bunch of answers for that on stackoverflow. In your case it'd be this:

git rev-list --ancestry-path --merges v5.4.101..mptcp_v0.96

This will print out all the merge points from the latest to v5.4.101. Keep in mind that there aren't merges for each patch version (v5.4.x) of the kernel on the mptcp branch.

There might be kernels older than 5.4.101 but closer to 5.4.101 merged into the branch. You can put the tag of an older kernel version to find them:

git rev-list --ancestry-path --merges v5.4.80..mptcp_v0.96

There's a merge for 5.4.96 which is the closest merge to 5.4.101:

Once you found a merge point you like, create a patch by comparing the tag of the merged kernel to the merge point and hope that the patch works for your kernel version (5.4.101) with little or no modification on it.

git diff v5.4.96..ff5643cb4dd5a2ae1459c5d279e87bf5aae4180c > mptcp_v0.96.patch

I learned most of this today so don't think I kept this information from you. I guess there's always something new to learn about git.

Hi. Unfortunately I couldn't make the bootable image by myself. So I found a freelancer who could do it (for some reasonable fee). As a result I have a snapshot with 5.4.170 kernel (and MPTCPv0) for Banana BPI R64.

can the VPS server hold more then 1 connection?

Hi @arinc9 thanks a lot for this useful tutorial, I have been able to create the image and install it in a Ubiquiti EdgeRouter X, however, I'm not very familiar with the setup of a proxie or VPN, and not even with OpenWRT, so I have several questions. It will be very kind from you to help.

  1. How can I check the installed image is including MPTCP correctly? same thing for luci-app-mptcp
  2. Do you have some link or any resources than could help me to setup the VPN?

Hi.

I don't deal with luci-app-mptcp. There's a command to check whether fullmesh path manager is enabled and if it detects multiple links. Take a look around in this thread or check the official multipath-tcp.org website for more information.

Check the links at the bottom of the main post.

Thanks for the quick response, I will be trying to set it up and I will let you know if I'm able to install it.

Hey, @arinc9, quick question its possible to add v2ray after the image is generated, how I mentioned before I created an image following your guide however I didn't add the v2ray feed, so I want to know if I need to recompile the kernel or just can add v2ray. Thanks

You can compile v2ray and its dependencies, then, install the created ipk files using opkg. You should check the OpenWrt Wiki for more information.

got it, thanks a lot!