How Linux Handles Multipath TCP Connections

Multipath TCP (MPTCP) in Linux enables a single transport-layer connection to transmit data concurrently across multiple physical network interfaces, such as Wi-Fi, Ethernet, and cellular. By managing aggregated bandwidth, link redundancy, and transparent failover at the kernel level, Linux abstracts multiple distinct network paths into what appears as a standard TCP stream to user-space applications. This article explains how the Linux kernel natively orchestrates MPTCP, covering socket creation, path management, packet scheduling, and congestion control.

Native Kernel Implementation

MPTCP support was integrated upstream starting in Linux kernel version 5.6. Rather than rewriting the core networking stack, Linux implements MPTCP as a coordination layer sitting directly on top of traditional TCP.

When an application requests an MPTCP connection using the IPPROTO_MPTCP socket protocol, the kernel creates an MPTCP master socket. Underneath this master socket, the kernel can spin up multiple standard TCP sockets, referred to as subflows. To the application, the interface operates identically to a standard POSIX socket API (read, write, send, recv), but the kernel distributes data across the underlying subflows transparently.

If a remote peer does not support MPTCP, the Linux kernel gracefully falls back to standard single-path TCP during the initial three-way handshake by stripping MPTCP options.

Path Management

Path management dictates how subflows are established, maintained, and torn down across available network interfaces. Linux supports two primary path management modes:

  1. In-Kernel Path Manager: A lightweight, kernel-space implementation ideal for basic multi-homing. It automatically monitors system network interfaces, listens for new IP addresses, and establishes subflows or advertises addresses to the remote host using MPTCP ADD_ADDR and REMOVE_ADDR options.
  2. Userspace Path Manager: Designed for advanced, policy-driven network environments. Linux exposes a Netlink interface that allows userspace daemons, such as mptcpd, to define complex routing policies, dictate interface priorities (such as preferring Wi-Fi over metered cellular), and manage subflow creation dynamically.

Packet Scheduling

Once multiple subflows are active, the Linux packet scheduler determines which subflow transmits each piece of outgoing data. The scheduler operates on the master socket's write queue and selects subflows based on specific algorithms:

Linux allows custom schedulers to be loaded via eBPF (Extended Berkeley Packet Filter), providing granular control over subflow selection based on real-time network metrics.

Coupled Congestion Control

Operating multiple TCP streams simultaneously risks consuming an unfair share of bandwidth when bottleneck links are shared with standard TCP traffic. To prevent this, Linux utilizes coupled congestion control algorithms, such as:

These algorithms link the congestion windows of all subflows belonging to the same MPTCP connection. If packet loss or latency spikes occur on one interface, the kernel slows down transmissions on that path while shifting traffic to healthier paths, ensuring network fairness across shared bottlenecks.

System Configuration and Tooling

MPTCP in Linux is managed directly via standard network configuration utilities: