multipath-tcp / mptcpd

mptcpd is a daemon for Linux that performs Multipath TCP path management related operations in the user space 😈
https://mptcpd.mptcp.dev/
BSD 3-Clause "New" or "Revised" License
175 stars 39 forks source link

Building and Installation issue #152

Open vandit86 opened 3 years ago

vandit86 commented 3 years ago

Please, help me to find the solution and resolve installation issue. I would appreciate any suggestion..
I follow the steps described in README and when I run ./bootstrap the following errors appear:

 vad@mp-vm:~/mptcpd$ ./bootstrap
libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: linking file 'm4/libtool.m4'
libtoolize: linking file 'm4/ltoptions.m4'
libtoolize: linking file 'm4/ltsugar.m4'
libtoolize: linking file 'm4/ltversion.m4'
libtoolize: linking file 'm4/lt~obsolete.m4'
configure.ac:103: error: possibly undefined macro: AC_MSG_ERROR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:164: error: possibly undefined macro: AC_DEFINE
autoreconf: /usr/bin/autoconf failed with exit status: 1

My configuration :

MPTCP v0.95 from multipath-tcp.org Linux Mint 20.2 kernel 5.4 with mptcp patch

vad@mp-vm:~/mptcpd$ m4 --version
m4 (GNU M4) 1.4.18
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Rene' Seindal.
vad@mp-vm:~/mptcpd$ command -v autoconf
/usr/bin/autoconf
vad@mp-vm:~/mptcpd$ autoconf --version
autoconf (GNU Autoconf) 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.
vad@mp-vm:~/mptcpd$ command -v automake
/usr/bin/automake
vad@mp-vm:~/mptcpd$ automake --version
automake (GNU automake) 1.16.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Tom Tromey <tromey@redhat.com>
       and Alexandre Duret-Lutz <adl@gnu.org>.

vad@mp-vm:~/mptcpd$ command -v libtool
/usr/bin/libtool
vad@mp-vm:~/mptcpd$ libtool --version
libtool (GNU libtool) 2.4.6
Written by Gordon Matzigkeit, 1996

Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
vad@mp-vm:~/mptcpd$ command -v pkg-config
/usr/bin/pkg-config
vad@mp-vm:~/mptcpd$ pkg-config --version
0.29.1

vad@mp-vm:~/mptcpd$ pandoc --version
pandoc 2.5
Compiled with pandoc-types 1.17.5.4, texmath 0.11.2.2, skylighting 0.7.7
Default user data directory: /home/vad/.pandoc
Copyright (C) 2006-2018 John MacFarlane
Web:  http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.

vad@mp-vm:~/mptcpd$ apt-cache policy libell-dev
libell-dev:
  Installed: 0.27-1
  Candidate: 0.27-1
  Version table:
 *** 0.27-1 500
        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status
vad@mp-vm:~/mptcpd$ apt-cache policy libargtable2-dev
libargtable2-dev:
  Installed: 13-1
  Candidate: 13-1
  Version table:
 *** 13-1 500
        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status

vad@mp-vm:~/mptcpd$ sudo sysctl -a | grep -i mptcp
kernel.osrelease = 5.4.0-mptcp
net.mptcp.mptcp_binder_gateways =
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 = default
net.mptcp.mptcp_syn_retries = 3
net.mptcp.mptcp_version = 0
ossama-othman commented 2 years ago

The mptcpd bootstrap script works without problem in our Ubuntu and Fedora builds. Both use vanilla GNU Autotool installations. Can you confirm that your GNU Autotool installation is fully functional since the macro it is complaining about AC_MSG_ERROR ships with Autoconf.

On a related note, do you have the GNU Autoconf Archive installed too?

If you're only looking to build and run mptcpd, and don't need to build the source from a Git repository, a pre-bootstrapped mptcpd source tar archive is available on the releases page such as mptcpd-0.7.tar.gz. Bootstrapping isn't necessary in this case.

Lastly, mptcpd 0.8 should be released over the next few days. It likely will not address the build issue you're seeing but it will contain several fixes and improvements.

vandit86 commented 2 years ago

Thank you for reply, Ossama

I solved the problem by compiling the upstream Linux Kernel ( v5.14 with mptcp v.1 enabled ) and installing .tar archive (mptcpd-0.7.tar.gz) as you suggest. Now, I can configure path-manager by using ip mptcp, and it works well creating additional sub-flows.
But how can I select mptcpd as default path manager ?? in mptcp v.0 there are specific sysctr value to select path manager.

I start the mptcp.service as indicated in tutorial, but NO additional sub-flow created in MPTCP session. also, how can I select path-manager plugin ? The only way i find, is by modifying mptcpd.conf in /usr/local/etc/mptcpd ??

systemctl list-units -a | grep mptcp
  mptcp.service                        loaded    active   running   Multipath TCP service 

cat /usr/local/etc/mptcpd/mptcpd.conf 
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2018, 2019, Intel Corporation

# ------------------------------------------------------------------
#                     mptcpd Configuration File
# ------------------------------------------------------------------

[core]
# -------------------------
# Default logging mechanism
# -------------------------
#   stderr  - standard unbuffered I/O stream
#   syslog  - POSIX based system logger
#   journal - systemd Journal
#   null    - disable logging
log=stderr

# ----------------
# Plugin directory
# ----------------
plugin-dir=/usr/local/lib/mptcpd

# -------------------
# Path manager plugin
# ---------------------
# The plugin found with the most favorable (lowest) priority will be
# used if one is not specified.
path-manager=addr_adv

I'm planning to develop own path-manager plugin to use with mptcpd. So, I'm interested if netlink path manager can work properly behind network namespaces, since OS kernel is shared between all instances (namespaces) in this case.?

Thank you once again..

ossama-othman commented 2 years ago

I start the mptcp.service as indicated in tutorial, but NO additional sub-flow created in MPTCP session.

mptcpd 0.8 fixes an issue in the addr_adv plugin that prevented subflows from being created. See PR #151 for details.

also, how can I select path-manager plugin ? The only way i find, is by modifying mptcpd.conf in /usr/local/etc/mptcpd ??

The plugin may also be selected from the mptcpd command line, e.g.:

$ ./mptcpd --help
Usage: mptcpd [OPTION...]
Start the Multipath TCP daemon.

      --addr-flags=FLAGS     Set flags for announced address, e.g.
                             --addr-flags=subflow
  -d, --debug                Enable debug log messages
  -l, --log=DEST             Log to DEST (stderr, syslog or journal), e.g.
                             --log=journal
      --notify-flags=FLAGS   Address notification flags, e.g.
                             --notify-flags=existing,skip_link_local,skip_loopback
      --path-manager=PLUGIN  Set default path manager to PLUGIN, e.g.
                             --path-manager=sspi, overriding plugin priorities
      --plugin-dir=DIR       Set plugin directory to DIR
  -?, --help                 Give this help list
      --usage                Give a short usage message
  -V, --version              Print program version

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

Report bugs to <mptcp@lists.linux.dev>.

I'm planning to develop own path-manager plugin to use with mptcpd. So, I'm interested if netlink path manager can work properly behind network namespaces, since OS kernel is shared between all instances (namespaces) in this case.?

The kernel netlink API supports net namespaces. For example, the pm_netlink.sh script tests the path management netlink API inside a net namespace.

Mptcpd itself makes no assumptions about net namespaces, but you can add it to one by setting the NetworkNamespacePath variable in the mptcpd.service unit file, or by leveraging ip netns as is done in the kernel MPTCP self tests.

ossama-othman commented 2 years ago

Rather than choose the default plugin, you may also be interested in a recent set of changes found on the master branch that allows the user to choose specifically which plugins to load when mptcpd starts through a new --load-plugins command line option or the load-plugins mptcpd configuration file entry. See pull request #167 for details.

vandit86 commented 2 years ago

OK, thank you. Currently, I'm running mptcpd v0.8 , using --path-manager option to select netlink path manager, since every installed plugin is loaded on start. Actually, I have opened this issue because I could not generate .configure file from /bootsrap command (as in README). So I have installed .tar archive (mptcpd-0.8.tar.gz) as you advised before. But, I'll try again..