Network Infrastructure Optimization: Guide to Configuring Multipath TCP (MPTCP) on Linux for VPS Bandwidth Bonding
A detailed guide to configuring Multipath TCP (MPTCP) on Linux to optimize VPS network performance by bonding multiple network connections. The article covers installation, kernel...
Introduction to Multipath TCP (MPTCP) and Benefits for VPS
Multipath TCP (MPTCP) is an extension of the standard TCP protocol that enables a single network connection to utilize multiple parallel paths simultaneously, such as Wi-Fi, Ethernet, or mobile networks. On a Virtual Private Server (VPS), MPTCP allows the server to leverage multiple network interfaces or connections from different providers, thereby increasing total bandwidth and improving reliability. MPTCP not only boosts overall throughput but also enhances fault tolerance by automatically switching paths when one connection fails. This makes it particularly valuable in production environments running Docker, Nginx, or other high-availability applications. To configure MPTCP on Linux, you need a supported operating system such as Ubuntu 22.04 or Debian 11 or later, and a kernel version 5.6 or higher, as MPTCP has been officially integrated since this release. This guide provides a detailed walkthrough of the configuration process on common Linux platforms.Configuring Multipath TCP on Linux
1. Check Kernel Version and Install MPTCP Tools
First, verify your current kernel version and check whether MPTCP is supported:uname -r
If your kernel is older than 5.6, you must upgrade your OS or use a supported LTS kernel. Then, install the `mptcp-tools` package:
sudo apt update
sudo apt install mptcp-tools
2. Enable MPTCP in the Kernel
To activate MPTCP, edit the `/etc/sysctl.conf` file and add the following parameters:# Enable MPTCP
net.mptcp.enabled = 1
net.mptcp.mptcp_enabled = 1
net.mptcp.mptcp_token = 1
net.mptcp.mptcp_subflows = 1
Apply the changes:
sudo sysctl -p
You can verify that MPTCP is enabled by running:
cat /proc/net/mptcp/mptcp_stats
If data appears, MPTCP has been successfully activated.
3. Configure Network Interfaces
For MPTCP to function, you need at least two network paths. On a VPS, this can be achieved by connecting to multiple network cards or using virtual network interfaces such as VLANs. For example, if you have two network interfaces: `eth0` and `eth1`, configure them as follows:# Assign IP address to eth1
sudo ip addr add 192.168.2.10/24 dev eth1
sudo ip link set eth1 up
Then, verify that both paths are active:
ip route show
4. Start MPTCP and Test the Connection
Use the `mptcpd` command to start the MPTCP daemon:sudo mptcpd
You can test the MPTCP connection using the `mptcp` command:
mptcp
If no connection appears, check whether the kernel supports MPTCP by running:
grep -i mptcp /proc/net/tcp
If no output is returned, the kernel may not be properly configured or may lack MPTCP support.
Troubleshooting Common Issues
- MPTCP fails to start: Verify that your kernel supports MPTCP. If not, upgrade to a supported version or use a Linux distribution with MPTCP support.
- No fallback path available: Ensure both network interfaces are active and can reach the same IP address.
- No MPTCP connection established: Confirm that `mptcp-tools` is installed correctly and that kernel parameters are set properly.
References
- [Multipath TCP (MPTCP) - Wikipedia](https://en.wikipedia.org/wiki/Multipath_TCP) - [Linux Kernel MPTCP Documentation](https://www.kernel.org/doc/html/latest/networking/mptcp.html) - [Ubuntu MPTCP Configuration Guide](https://ubuntu.com/server/docs/network-multipath-tcp) For further reading on optimizing VPS network performance, see: Optimizing NVMe Gen5 Cloud VPS Performance in 2026: TCP BBR, KVM vs Containers, IOPS & Reliability.Related infrastructure & engineering guides: NVMe Cloud VPS for Docker, Nginx & Databases
Recommended NVMe Cloud VPS Plans to Deploy This Setup
Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.
VPS-3E
10% VAT included
- CPU: 2 vCPU
- RAM: 4 GB
- SSD: 50 GB NVMe
