multipath-tcp / mptcp

⚠️⚠️⚠️ Deprecated 🚫 Out-of-tree Linux Kernel implementation of MultiPath TCP. 👉 Use https://github.com/multipath-tcp/mptcp_net-next repo instead ⚠️⚠️⚠️
https://github.com/multipath-tcp/mptcp_net-next
Other
890 stars 335 forks source link

issue with ubuntu 14.04 and mptcp #248

Closed luca313 closed 6 years ago

luca313 commented 6 years ago

I've been trying to install on a Ubuntu 14.04.1 guest on virtualbox mptcp 2015_07_20. I know it's an old version, but I need right this one, because it's 32b and I'm working on a 32b program that uses it. When I compiled the kernel, the kernel version I was returned with was 3.18.0, with no mptcp attached... I typed sysctl -a | grep mptcp, and got

net.mptcp.mptcp_checksum = 1
net.mptcp.mptcp_debug = 0
net.mptcp.mptcp_enabled = 1
net.mptcp.mptcp_path_manager = fullmesh
net.mptcp.mptcp_scheduler = roundrobin
net.mptcp.mptcp__syn_retries = 3

Then I opened config 3.18.0 in /boot to check, and got these entries

CONFIG_MPTCP=y
CONFIG_MPTCP_PM_ADVANCED=y
CONFIG_MPTCP_FULLMESH=y
# CONFIG_MPTCP_NDIFFPORTS is not set
CONFIG_MPTCP_BINDER is not set
CONFIG_DEFAULT_FULLMESH=y
# CONFIG_DEFAULT_DUMMY is not set
CONFIG_DEFAULT_MPTCP__PM="fullmesh"
CONFIG_MPTCP_SCHED_ADVANCED=y
CONFIG_MPTCP_ROUNDROBIN=y
#CONFIG_DEFAULT_SCHEDULER is not set
CONFIG_DEFAULT_ROUNDROBIN=y
CONFIG_DEFAULT_MPTCP_SCHED="roundrobin"

both amusingmptcp.de and "curl http://www.multipath-tcp.org" say mptcp is not installed, but the only kernels I have on the virtual machine are "3.13.0-32-generic" and 3.18.0, so what went wrong and how can I install the mptcp 32b on my virtual machine? I really beg for your help

luca313 commented 6 years ago

Can I solve it from terminal? *edit: what are the standard settings I must input for these variables? do you need more data to check if I'm right?

luca313 commented 6 years ago

I checked my version and it's v0.89.0-rc On the configure mptcp page I read that ndiffports refers to the path manager, and I have set it as round robin, isn't it? So I can't understand what you meant when you wrote it's not set. Also, sorry, but I really need some help to finish configuring it. As I said, I really need the 32b version, since I am using it with a 32b program.

matttbe commented 6 years ago

Hi @luca313,

I know it's an old version, but I need right this one, because it's 32b and I'm working on a 32b program that uses it.

Only packages for 64-bit platforms are provided but you can compile any version for any platform supported by the Linux kernel. Because you are already compiling it, we would recommand you to switch to the latest v0.94 or v0.93.

net.mptcp.mptcp_scheduler = roundrobin

Note that it is maybe not what you want. This is very not good on a performance view point.

When I compiled the kernel, the kernel version I was returned with was 3.18.0, with no mptcp attached...

Please check you are using the right kernel: dmesg | grep -i MPTCP and uname -a.

If you have the right kernel, maybe the options are stripped by a middlebox on the network. You can use tcpdump/wireshark to check that the SYN's you sent have MPTCP options. You can also use tracebox tool to get more details: http://blog.multipath-tcp.org/blog/html/page3.html

matttbe commented 6 years ago

As I said, I really need the 32b version, since I am using it with a 32b program.

Note that you can have a 64-bit kernel and launch 32-bit programs. Just installed needed 32-bit libs: e.g. https://stackoverflow.com/a/23194339

luca313 commented 6 years ago

Thanx Matt, I will try this now. I cloned the last version on my 32b machine and will compile it now. I know round robin isn't ideal, but I need that scheduler for my purposes... I will switch to some higher performing one later. I will also prepare a 64b machine as backup, to try everything. Thanks for your guidance, I will try and post again to let you know.

luca313 commented 6 years ago

ubuntu 1604-64-2018-03-15-17-49-35 This my situation on a virtual machine on VMWare 12, running Ubuntu 16.04 64b. I wanted to make it a backup situation, in case my main machine doesn't work.

This latter is my main machine, running Ubuntu 14.05. screenshot 44

  1. In both cases I thought I installed mptcp, since its kernel is that one: 4.9.87+, am I right? In case I'm wrong can you help me?

  2. If, worst case scenario, it's not installed and I cannot do anything, with these virtual machines, what are the exact terminal commands to setup the variables as intended? I need to setup LIA as congestion control, full mesh, also as default path manager, and round robin as default scheduler. If I were to install it on a Ubuntu 64b machine by apt repository, what exact instructions should I type to set it up as intended?

I hope I'm not a bother, but I'm really in a dire situation

matttbe commented 6 years ago

In both cases I thought I installed mptcp, since its kernel is that one: 4.9.87+, am I right? In case I'm wrong can you help me?

According to the sysctl, MPTCP is available. The + at the end of the version means you didn't compile it using the git source or you were not on a tag I think.

If curl http://www.multipath-tcp.org continues to say that MPTCP is not supported, check if the network doesn't strip the MPTCP options. You can also try using different ports: http://amiusingmptcp.de/#ports

I need to setup LIA as congestion control, full mesh, also as default path manager, and round robin as default scheduler.

You can change the different sysctl's: http://multipath-tcp.org/pmwiki.php/Users/ConfigureMPTCP

If I were to install it on a Ubuntu 64b machine by apt repository, what exact instructions should I type to set it up as intended?

Then you can use the APT repo: http://multipath-tcp.org/pmwiki.php/Users/AptRepository

luca313 commented 6 years ago

I did use the git source, to be honest it feels strange to me, too, since I followed the instructions online. I installed git on a new machine, then qt4-qmake, libqt4-dev, aptitude. then build-essential on the 14.05 32b machine, and it was already installed on the 16.04 64b one. then I cloned mptcp through git, and this was the result. On the 32b machine, now, I typed uname -a and got: luca@ubuntu14045-32b:~$ uname -a Linux ubuntu14045-32b 4.9.87+ #1 SMP Thu Mar 15 14:51:48 CET 2018 i686 i686 i686 GNU/Linux and again, after installing curl, I got this: luca@ubuntu14045-32b:~$ curl http://www.multipath-tcp.org Nay, Nay, Nay, your have an old computer that does not speak MPTCP. Shame on you!

Also http://amiusingmptcp.de/#ports doesn't seem to find anything. What did you mean by "you were not on a tag"? Sorry, English isn't my first language. I'd love to solve this issue as soon as possible. To be true, I had it running just fine a couple years ago, but lately I can't seem to succeed, and it's making me crazy.

On the 64b machine, same things... I really can't understand what happens...

luca313 commented 6 years ago

I'm working also on a machine with ubuntu 14.04 64b now (that should make my 15th virtual machine this week): I succeeded installing via apt-repository: when using uname -r I get "4.14.24.mptcp" as expected. I succeeded in setting full mesh as path manager, but I can't change the scheduler to roundrobin nor the congestion control to lia virtualbox_ubuntu 1404-64_15_03_2018_20_44_51 virtualbox_ubuntu 1404-64_15_03_2018_20_42_22

I also typed, to be sure: sudo modprobe mptcp_lia and I got: modprobe: FATAL: Module mptcp_lia not found in directory /lib/modules/4.14.24.mptcp when I did the same for balia or olia (to be sure), I got: modprobe: ERROR: could not insert 'mptcp_balia': Invalid Argument

What am I doing wrong, and what should I do to set up things as intended, that is lia congestion control, and round robin scheduling? I also checked with curl http://www.multipath-tcp.org and amiusingtcp.de/#ports and again I only get negative answers...

on the other machines, I cloned from git with the command: git clone --depth=1 git://github.com/multipath-tcp/mptcp.git

I don't think I supposed to clone by typing: git clone -b mptcp_v0.94 git://github.com/multipath-tcp/mptcp

By the way, please, help me: I just need a working virtual machine to work on... To be honest, it's everything I need to graduate, now, for the experimental part of my thesis, and I am really in panic, if me installing dozens of virtual machines and trying every different path I can didn't show...

matttbe commented 6 years ago

Hi @luca313

For the congestion controls, they are either not compiled as a module or not compiled at all. Do you see them in the config.gz file for your kernel in /boot? (or if you compiled it yourself, in your .config file.

luca@ubuntu14045-32b:$ curl http://www.multipath-tcp.org Nay, Nay, Nay, your have an old computer that does not speak MPTCP. Shame on you!

Again, it might be due to changes in your network.

If you have the right kernel, maybe the options are stripped by a middlebox on the network. You can use tcpdump/wireshark to check that the SYN's you sent have MPTCP options. You can also use tracebox tool to get more details: http://blog.multipath-tcp.org/blog/html/page3.html

We cannot help you if you don't check with tcpdump/wireshark that the SYN's you are sending have MPTCP options and the SYN+ACK you receive have no MPTCP options. TraceBox is also useful for that, please read the webpage.

luca313 commented 6 years ago

I've found this, in the machine with mptcp installed from apt-repository

CONFIG_TCP_CONG_ADVANCED=y
CONFIG_TCP_CONG_BIC=m
CONFIG_TCP_CONG_CUBIC=y
CONFIG_TCP_CONG_WESTWOOD=m
CONFIG_TCP_CONG_HTCP=m
CONFIG_TCP_CONG_HSTCP=m
CONFIG_TCP_CONG_HYBLA=m
CONFIG_TCP_CONG_VEGAS=m
CONFIG_TCP_CONG_NV=m
CONFIG_TCP_CONG_SCALABLE=m
CONFIG_TCP_CONG_LP=m
CONFIG_TCP_CONG_VENO=m
CONFIG_TCP_CONG_YEAH=m
CONFIG_TCP_CONG_ILLINOIS=m
CONFIG_TCP_CONG_DCTCP=m
CONFIG_TCP_CONG_CDG=m
CONFIG_TCP_CONG_BBR=m
CONFIG_TCP_CONG_LIA=m
CONFIG_TCP_CONG_OLIA=m
CONFIG_TCP_CONG_WVEGAS=m
CONFIG_TCP_CONG_BALIA=m
CONFIG_DEFAULT_CUBIC=y
# CONFIG_DEFAULT_RENO is not set
CONFIG_DEFAULT_TCP_CONG="cubic"
CONFIG_TCP_MD5SIG=y

and these are the lines about mptcp:

CONFIG_MPTCP=y
CONFIG_MPTCP_PM_ADVANCED=y
CONFIG_MPTCP_FULLMESH=y
CONFIG_MPTCP_NDIFFPORTS=m
CONFIG_MPTCP_BINDER=m
CONFIG_DEFAULT_FULLMESH=y
# CONFIG_DEFAULT_DUMMY is not set
CONFIG_DEFAULT_MPTCP_PM="fullmesh"
CONFIG_MPTCP_SCHED_ADVANCED=y
CONFIG_MPTCP_ROUNDROBIN=m
CONFIG_MPTCP_REDUNDANT=m
CONFIG_DEFAULT_SCHEDULER=y
CONFIG_DEFAULT_MPTCP_SCHED="default"

I've also seen that ipv6 is enabled in this configuration, but I guess it's right, here.

matttbe commented 6 years ago

I've found this, in the machine with mptcp installed from apt-repository

Then in this machine, you should find files ending with *lia.ko:

find /lib/modules/$(uname -r) -name "*lia.ko"

If you don't find any, check you booted on the right kernel (uname -r should tell you which one you are using). You can insmod <PATH/TO/FILE.ko>.

I've also seen that ipv6 is enabled in this configuration, but I guess it's right, here.

CONFIG_MPTCP depends on CONFIG_IPV6

luca313 commented 6 years ago
luca@ubuntu1404-64:~/Desktop$ find /lib/modules/$(uname -r) -name "*lia.ko"
/lib/modules/4.14.24.mptcp/kernel/net/mptcp/mptcp_olia.ko
/lib/modules/4.14.24.mptcp/kernel/net/mptcp/mptcp_balia.ko

I can't see any lia, though...is it normal? the kernel is the right one, to be honest I used grub configurator to check, and when I uname -r I get: 4.14.24.mptcp as expected. Good to know ipv6 is as expected: one point less to care about. Can I modify the lines from the config file to set it up as I want, with full mesh, round robin and lia, instead of trying from command line with sysctl? and, since I didn't get mptcp_lia.ko, is it possible, about lia? As things are, with a new machine with precompiled code from apt-repository, I think the problem with my machine might be solely of configuration, so, adjusting it might make it work...

I have noticed this in the config: CONFIG_TCP_CONG_LIA=m is it normal that it's set to m? if not, what am I supposed to do?

matttbe commented 6 years ago

I can't see any lia, though...is it normal?

I think yes if I remember correctly. We should look at the code why, I don't remember.

Can you use olia or balia?

Can I modify the lines from the config file to set it up as I want, with full mesh, round robin and lia, instead of trying from command line with sysctl? and, since I didn't get mptcp_lia.ko, is it possible, about lia? As things are, with a new machine with precompiled code from apt-repository, I think the problem with my machine might be solely of configuration, so, adjusting it might make it work...

Maybe better to recompile the kernel but first change these settings with make menuconfig (or xconfig or whatever). You should be able to set lia as default CC, roundrobin as default scheduler and any other PM as default PM.

luca313 commented 6 years ago

To be honest, I was requested to use lia, or I wouldn't bother changing. I think I could change, if I talk to my relator.

hmmm, I used an apt-repository on this machine, so the kernel should be precompiled, since I installed it with apt-get install.

all other machines, though, have compiled code, so it's feasible on those. By the way, if you suggest olia or balia shouldn't give problems, I'll try and convince my relator, but now I'll try the normal way with sysctl.

luca313 commented 6 years ago

I tried to set up the scheduler like this

luca@ubuntu1404-64:~/Desktop$ sudo sysctl -w net.mptcp.mptcp_scheduler=roundrobin
sysctl: setting key "net.mptcp.mptcp_scheduler": No such file or directory
net.mptcp.mptcp_scheduler = roundrobin

I remind you this is a machine with precompiled code downloaded from apt-repository

matttbe commented 6 years ago

I don't know why it doesn't work. According to the error, you are not doing that on a machine having this sysctl key. Maybe someone else has other ideas?

Try this:

sudo sh -c "echo roundrobin > /proc/sys/net/mptcp/mptcp_scheduler"

If it does not work either, certainly better for you to compile the kernel after having changed the default configuration.

luca313 commented 6 years ago

sh: echo: I/O error

No result, it seems as if there isn't any key net.mptcp.mptcp_scheduler, but when I try and type sysctl -a | grep mptcp it returns it set as default... I'll try again with a virtual machine with ubuntu 14.04 32 with old code and new code, 14.04.64 with old, new to compile and with the apt-repository, and with 16.04 with the above mentioned options... it just seems so strange: theoretically it should work. It worked in the past, both with 14.04 with old mptcp code (I have it on a pendrive), and until monday it worked on 14.04 64b with compiled code. I have everything written down, to each step, because it's in my thesis, and now I nothing, and I must delay my thesis of some months... it's so frustrating... Well, thanks for your guidance till now, I'll write again after the new tests

lentilwallop commented 6 years ago

I think he compiled in mptcp in the kernel but not the tcp advanced congestion control part of mptcp, It is in another subgroup in menuconfig 4 lines above the mptcp option.

matttbe commented 6 years ago

For TCP CC with MPTCP 0.94: it was maybe linked to #254

I am closing this ticket. Feel free to re-open it (or a new one) if there are other issues.

Llorx commented 6 years ago

I do have the *lia.ko files, but when I try to modproble them, I receive a could not insert 'mptcp_balia': Invalid argument error.

If I try to modproble a non-existent module, it says the the module is not found, so mptcp_balia is found actually, just giving problems when modprobing them.

/lib/modules/4.14.24.mptcp/kernel/net/mptcp/mptcp_coupled.ko
/lib/modules/4.14.24.mptcp/kernel/net/mptcp/mptcp_rr.ko
/lib/modules/4.14.24.mptcp/kernel/net/mptcp/mptcp_olia.ko
/lib/modules/4.14.24.mptcp/kernel/net/mptcp/mptcp_wvegas.ko
/lib/modules/4.14.24.mptcp/kernel/net/mptcp/mptcp_binder.ko
/lib/modules/4.14.24.mptcp/kernel/net/mptcp/mptcp_redundant.ko
/lib/modules/4.14.24.mptcp/kernel/net/mptcp/mptcp_ndiffports.ko
/lib/modules/4.14.24.mptcp/kernel/net/mptcp/mptcp_balia.ko

EDIT: modproble mptcp_wvegas worked. Kinda weird.

EDIT2: After modprobing, with or without rebooting and such, don't appears as a congestion control:

# sysctl net | grep congestion
net.ipv4.tcp_allowed_congestion_control = cubic reno
net.ipv4.tcp_available_congestion_control = cubic reno
net.ipv4.tcp_congestion_control = cubic

EDIT3: The machine has MPTCP enabled as curl http://www.multipath-tcp.org yays.

matttbe commented 6 years ago

@Llorx please have a look at #254 or #258 : the fix is not in a released version yet. You will need to compile the source if you don't want to wait.

Llorx commented 6 years ago

How I missed your comment linking to https://github.com/multipath-tcp/mptcp/issues/254 up there. Sorry for bothering you.